mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
Discourse AI is configured through an LlmModel row rather than settings, so the addon upserts one via rails: provider open_ai, the gateway's chat-completions URL, the model the gateway serves, and this role's virtual key. It then binds that row to ai_default_llm_model and to the bot, because a model that exists but is bound to nothing serves no surface. llm_models.url is POSTed verbatim, so DISCOURSE_LITELLM_CHAT_ENDPOINT carries the full /v1/chat/completions path rather than a base URL. Every other consumer in this requirement takes a base and appends; getting this one wrong produces a 404 at prompt time, long after a green deploy. Three things had to be cleared before any of that could work. Discourse refuses to call a private address unless the host is in allowed_internal_hosts, and it fails as an opaque provider error rather than as a blocked request. The script appends the gateway host to that list and leaves existing entries alone, which matters because the OIDC bootstrap in config.yml.j2 appends the discovery host to the same pipe-separated setting. Both sides check membership before adding, so they compose instead of clobbering each other. The launcher-managed container sits outside the compose graph and does not join the gateway network on its own. handlers/stack_host.yml adds DISCOURSE_LITELLM_NETWORK to its network list and config.yml.j2 passes the matching --network flag, both only while litellm is enabled. The bootstrap aborted before the plugin could install at all. after_code cloned every enabled plugin unconditionally, but a bundled plugin already sits in $home/plugins, git exits non-zero on the clone, and the whole bootstrap stops. discourse-ai is bundled in current images, so it now skips plugins whose source is bundled. mem_limit goes from 2g to 4g. `rails r` boots a second Rails inside the container already running unicorn and sidekiq, and at 2g the kernel kills it mid-run: measured in deploy-036-11 and again in deploy-ai-v2-7, where the task died with "Killed" and the deploy ended at exit 137. Upstream documents 4 GB as Discourse's own minimum, so this corrects an under-provisioned limit rather than working around the task. The variant resource budget still passes. Verified: the OOM with the exact task and exit code across two independent runs, the bundled-plugin abort, and that the budget test holds at 4g. Not verified: the registration has never completed, because every attempt so far died at the OOM first. The eight-fact read-back assertion and addons/discourse-ai.spec.js are both entirely unexercised, the spec because the addon bridge gate had it skipping. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
41 lines
1.9 KiB
Bash
41 lines
1.9 KiB
Bash
ADMIN_PASSWORD={{ lookup('users', 'administrator').password | dotenv_quote }}
|
|
|
|
ADMIN_USERNAME={{ lookup('users', 'administrator').username | dotenv_quote }}
|
|
|
|
APP_BASE_URL={{ lookup('tls', application_id, 'url.base') | dotenv_quote }}
|
|
|
|
BIBER_PASSWORD={{ lookup('users', 'biber').password | dotenv_quote }}
|
|
|
|
BIBER_USERNAME={{ lookup('users', 'biber').username | dotenv_quote }}
|
|
|
|
CANONICAL_DOMAIN={{ lookup('domain', application_id) | dotenv_quote }}
|
|
|
|
DISCOURSE_AI_LLM_DISPLAY_NAME={{ DISCOURSE_AI_LLM_DISPLAY_NAME | dotenv_quote }}
|
|
|
|
DISCOURSE_BASE_URL={{ lookup('tls', application_id, 'url.base') | dotenv_quote }}
|
|
|
|
DISCOURSE_LITELLM_CHAT_ENDPOINT={{ DISCOURSE_LITELLM_CHAT_ENDPOINT | dotenv_quote }}
|
|
|
|
DISCOURSE_LITELLM_MODEL={{ LITELLM_CHAT_MODEL | dotenv_quote }}
|
|
|
|
# nocheck: playwright-service-gate — covered by sys-svc-mail integration tests, not the persona surface
|
|
EMAIL_SERVICE_ENABLED={{ lookup('config', application_id, 'services.email.enabled') | string | lower }}
|
|
|
|
# nocheck: playwright-service-gate — persona drives the OIDC path; LDAP federation is exercised in the LDAP-only matrix variant
|
|
LDAP_SERVICE_ENABLED={{ lookup('config', application_id, 'services.ldap.enabled') | string | lower }}
|
|
|
|
# nocheck: playwright-service-gate — consumed via shared persona helpers (roles/test-e2e-playwright/files/personas/)
|
|
LOGOUT_SERVICE_ENABLED={{ lookup('config', application_id, 'services.logout.enabled') | string | lower }}
|
|
|
|
MATOMO_BASE_URL={{ lookup('tls', 'web-app-matomo', 'url.base') | dotenv_quote }}
|
|
|
|
# nocheck: playwright-service-gate — consumed via shared persona helpers (roles/test-e2e-playwright/files/personas/)
|
|
MATOMO_SERVICE_ENABLED={{ lookup('config', application_id, 'services.matomo.enabled') | string | lower }}
|
|
|
|
OIDC_ISSUER_URL={{ OIDC.CLIENT.ISSUER_URL | dotenv_quote }}
|
|
|
|
SSO_SERVICE_ENABLED={{ lookup('config', application_id, 'services.sso.enabled') | string | lower }}
|
|
|
|
{{ lookup('addon_env_flags', application_id) }}
|
|
|