presenton/servers/nextjs/app/api
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
..
can-change-keys refactor!: use presenton docker codebase 2025-06-23 15:13:04 +05:45
export-as-pdf fix(nextjs): Handle missing directory paths in API routes 2025-11-12 19:39:09 +05:45
has-required-key feat: local image provider 2025-12-15 19:12:34 +05:45
presentation_to_pptx_model fix: export issue in chromium 2025-09-09 05:19:57 +05:45
read-file Add(others): Custom Filename sanitize & fix(api/read-file): Uncontrolled data used 2025-07-12 01:22:59 +05:45
save-layout feat(Nextjs): Save Layout implemented 2025-07-31 22:36:58 +05:45
telemetry-status feat: add telemetry in electron app & UI improvements 2026-04-02 01:10:53 +05:45
template fix(fastapi): /edit, /derive and /export endpoints 2025-09-12 02:27:59 +05:45
templates refactor(nextjs): use template keyword instead of group/group layouts 2025-09-22 17:20:55 +05:45
upload-image fix(nextjs): Handle missing directory paths in API routes 2025-11-12 19:39:09 +05:45
user-config feat: add Open WebUI as image generation provider 2026-04-05 12:27:45 -05:00