Files
computer-playbook/roles/web-app-nextcloud/meta/addons/integration_openai.yml
kevinveenbirkenbachandClaude Opus 4.8 66a1259842 refactor(web-app-nextcloud): point integration_openai at the shared gateway
Nextcloud reached its OpenAI-compatible backend through Flowise, which
only forwarded to the LiteLLM sidecar that Flowise no longer runs. The
consumer flag, the activation condition and the endpoint now bind to
svc-ai-litellm directly, one hop shorter.

The endpoint switches from Flowise' public TLS URL to the internal
gateway address plus /v1, so a container-to-container call no longer
travels through the reverse proxy.

The api_key stops crossing a role boundary: it was read from
web-app-flowise credentials.llm_master_key, handing Nextcloud
administrative access to the whole gateway, and is now this role's own
per-consumer virtual key.

The litellm variant pin sits on variant 7 rather than 3 because adding
the gateway to variant 3 pushed that round past the matrix memory budget.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-25 20:16:52 +02:00

16 lines
550 B
YAML

---
enabled: "{{ (lookup('config', 'web-app-nextcloud', 'services.openwebui.enabled') | bool) or (lookup('config', 'web-app-nextcloud', 'services.litellm.enabled') |
bool) }}"
required: true
mechanism: plugin
source: upstream
bridges:
- openwebui
- litellm
config:
plugin_configuration:
- appid: "integration_openai"
configkey: "url"
configvalue: "{{ (lookup('tls', 'web-app-openwebui', 'url.base') | regex_replace('/+$', '') ~ '/api') if ('web-app-openwebui' in group_names) else (LITELLM_BASE_LOCAL_URL
~ '/v1') }}"