presenton/servers/fastapi/models
Christopher Quenneville f2703ec003 feat: add Open WebUI as image generation provider
Add native support for Open WebUI's image generation API as a new
image provider option. Open WebUI exposes an OpenAI-like
/v1/images/generations endpoint but with key differences that
require special handling:

- Response is a bare JSON array instead of {"data": [...]}
- Image URLs are relative paths (e.g. /api/v1/files/.../content)
- File downloads require the same Bearer auth token

The implementation uses raw HTTP calls via aiohttp rather than the
OpenAI SDK to handle these differences. No model parameter is sent
since Open WebUI manages the image model in its own admin settings.

Backend changes:
- New OPEN_WEBUI enum value in ImageProvider
- generate_image_open_webui() method in ImageGenerationService
- Environment getters/setters for OPEN_WEBUI_IMAGE_URL and
  OPEN_WEBUI_IMAGE_API_KEY
- UserConfig model and config loading/saving pipeline updated

Frontend changes:
- New "Open WebUI" option in image provider dropdown
- Settings UI with URL and optional API key fields
- Validation, field mappings, and config persistence

Docker:
- OPEN_WEBUI_IMAGE_URL and OPEN_WEBUI_IMAGE_API_KEY added to all
  docker-compose service definitions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 12:27:45 -05:00
..
sql feat: enhance image handling in FastAPI and Next.js with web-safe URLs 2026-03-13 13:34:25 +05:45
__init__.py feat(fastapi): adds get presentation from id endpoint 2025-07-17 00:27:49 +05:45
api_error_model.py feat(fastapi): adds mock endpoints for webhook events 2025-09-16 17:33:34 +05:45
decomposed_file_info.py feat(fastapi): adds presentation generation using provided slide schemas, refactor(fastapi): converts class based endpoint handlers to organized functional handlers 2025-07-15 05:41:31 +05:45
document_chunk.py fix(fastapi): uses SlideOutlineModel to wrap slide outline, to fix json repair issue 2025-08-06 21:53:40 +05:45
generate_presentation_request.py feat(fastapi): adds trigger_webhook option in generate request 2025-09-17 14:54:12 +05:45
image_prompt.py feat(fastapi): adds image generation service 2025-07-15 23:13:00 +05:45
json_path_guide.py feat(fastapi): adds slide assets generation, adds dict and schema processors, fix(nextjs): changes image and icon schema fields to __xxxxx__ 2025-07-17 06:38:02 +05:45
llm_message.py fix(fastapi): solves malformed function call from google on ResponseSchema function call 2025-08-11 20:55:25 +05:45
llm_tool_call.py fix(fastapi): solves malformed function call from google on ResponseSchema function call 2025-08-11 20:55:25 +05:45
llm_tools.py feat(fastapi): adds anthropic web search, fix(fastapi): llm messages to system and user message 2025-08-09 01:36:16 +05:45
ollama_model_metadata.py style: remove ollama icons 2025-08-09 03:47:52 +05:45
ollama_model_status.py feat(fastapi): adds presentation generation using provided slide schemas, refactor(fastapi): converts class based endpoint handlers to organized functional handlers 2025-07-15 05:41:31 +05:45
pptx_models.py feat(fastapi): adds logic to generate speaker notes and slide note support in export 2025-08-12 16:18:57 +05:45
presentation_and_path.py feat: adds tone, verbosity and refactors tables 2025-08-29 10:52:34 +05:45
presentation_from_template.py fix(fastapi): /edit, /derive and /export endpoints 2025-09-12 02:27:59 +05:45
presentation_layout.py feat(fastapi): adds strict support for every schemas, proper models check, refactor 2025-08-01 00:15:03 +05:45
presentation_outline_model.py fix(fastapi): uses SlideOutlineModel to wrap slide outline, to fix json repair issue 2025-08-06 21:53:40 +05:45
presentation_structure_model.py feat(fastapi): adds presentation generation using provided slide schemas, refactor(fastapi): converts class based endpoint handlers to organized functional handlers 2025-07-15 05:41:31 +05:45
presentation_with_slides.py feat: completed theme & custom theme UI 2026-03-03 10:50:11 +05:45
slide_layout_index.py feat(fastapi): adds slide edit feature 2025-07-21 01:27:15 +05:45
sse_response.py fix(fastapi+nextjs): provides default height and width if not available, provides presentation json in sse complete response in outlines 2025-07-26 02:13:54 +05:45
theme_data.py feat: add theme management endpoints, integrate color palette generation and UI implementation 2026-03-02 23:15:15 +05:45
user_config.py feat: add Open WebUI as image generation provider 2026-04-05 12:27:45 -05:00