Repository navigation
Conversation
On-prem webhooks no longer runs AI tasks. The new ai-queue-worker service consumes the ai-bmq queue; without it, AI explanations and chat stop. - Service in compose.currents.yml, same image repository and tag as the other services, same .env. Redis and MongoDB dependencies and the RustFS path-style setting are copied from webhooks. Compose files regenerated. - .env.example and the configuration reference list the LLM_* settings. - Docs: services list, ECR policy and image mirroring lists, changelog upgrade notes. The image exists only in the Currents release that contains currents-dev/currents#4874. Release this with that image tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011baD3izoabUn31Y3WeQHMp
|
| Topic | Details | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Operations Documentation | Document AI worker configuration and upgrades, register its image for ECR access and mirroring, and list it among on-prem services.Modified files (5)
Latest Contributors(2)
| |||||||||
| AI Worker Deployment | Add and wire the ai-queue-worker container into on-prem Compose templates and generated database, cache, and RustFS variants, including required dependencies and environment settings.Modified files (7)
Latest Contributors(2)
|
Merger 🟡 Pending
The reviewer raised three open concerns about making the worker opt-in via the ai Compose profile and documenting how customers enable it, but the diff does not address them. The author has not yet responded or pushed a fix.
twk3
left a comment
There was a problem hiding this comment.
Ran this locally on images built from main 6f87424c7 (includes currents-dev/currents#4874), full compose file, with USE_MOCK_AI=true. The worker starts and webhooks no longer takes AI tasks. testSidebarAiAnalysis.spec.ts passed with its GraphQL stub removed: both requests in aiRequests completed, and only ai-queue-worker logged them.
One change requested: put the service behind a Compose profile so it is off by default for now. AI is already off per org until features.aiAnalysis is set, and the worker needs LLM_* settings to do anything, so most installs would run an idle container and have to pull and mirror an image they don't use. With a profile, docker compose pull and up skip it unless COMPOSE_PROFILES includes ai. traefik already does this with tls. Comments inline.
| EMAIL_TRANSPORTER: smtp | ||
|
|
||
| # Runs the AI tasks from the ai-bmq queue. Reads the LLM_* settings from .env. | ||
| ai-queue-worker: |
There was a problem hiding this comment.
Can we add a profile here so the service is off by default?
ai-queue-worker:
profiles:
- aiThen regenerate with scripts/sync-templates.sh. I checked that COMPOSE_PROFILES=ai in .env turns it on (COMPOSE_PROFILES=tls,ai with TLS), and that the depends_on and FILE_STORAGE_FORCE_PATH_STYLE overrides in the mongodb, redis and rustfs templates still merge onto it.
| # ============================================================================= | ||
| # AI explanations and chat (Optional) | ||
| # ============================================================================= | ||
| # The ai-queue-worker service runs the AI tasks (test explanations, chat) and |
There was a problem hiding this comment.
With the profile, this section should say how to turn the service on: a commented # COMPOSE_PROFILES=ai line above LLM_PROVIDER_URL for customers to uncomment, noting it combines with tls as COMPOSE_PROFILES=tls,ai. Same for the AI section in docs/configuration.md.
| - Image `ai-queue-worker`. Pull or mirror it with the other images (see [Container Image Access](../docs/container-images.md)), and add the `currents/on-prem/ai-queue-worker` repository to your ECR policy. | ||
|
|
||
| ### Upgrade Notes | ||
| - `webhooks` no longer runs AI tasks. Without the `ai-queue-worker` service, AI explanations and chat stop. The service reads the same `.env` as the others; `LLM_PROVIDER_URL`, `LLM_API_KEY` and the other `LLM_*` settings apply to it (see AI Explanations and Chat in the [Configuration Reference](../docs/configuration.md)). |
There was a problem hiding this comment.
With the profile off by default, this note needs to tell AI users to add ai to COMPOSE_PROFILES when they upgrade. If an org has aiAnalysis on and the worker isn't running, the API still enqueues on ai-bmq and the dashboard shows the request as pending with no end: I found no timeout that marks it failed. The ### Added image note can also say the image is only needed with the ai profile.
Baz withdrew its approval because this pull request is no longer ready to merge.
Owner: @agoldis
Linear: ENG-2181
Adds the
ai-queue-workerservice. On-premwebhooksno longer runs AI tasks after the Currents release that contains currents-dev/currents#4874, so without this service AI explanations and chat stop.This must ship with, not before, the Currents release that contains currents-dev/currents#4874. The image
ai-queue-workerdoes not exist before then, sodocker compose pullfails for the new service on any earlier tag. Merge it into the release that setsDC_CURRENTS_IMAGE_TAGto that tag.Changes
templates/compose.currents.yml: serviceai-queue-worker, image${DC_CURRENTS_IMAGE_REPOSITORY}ai-queue-worker:${DC_CURRENTS_IMAGE_TAG}, built likewebhooks(env_file: .env,CURRENTS_ENV: onprem, no ports, no command override).depends_on, and the RustFSFILE_STORAGE_FORCE_PATH_STYLE, are copied fromwebhooksin the three data-service templates.scripts/sync-templates.sh..env.exampleanddocs/configuration.md: theLLM_*andAI_QUEUE_CONCURRENCYsettings. No new required variable; they are optional.docs/container-images.md: ECR policy and both image-mirroring lists.on-prem/README.md: services list.on-prem/CHANGELOG.md: Unreleased entries with the upgrade notes below.webhooksand the director are unchanged. No compose file setsAI_QUEUE_WORKER_ENABLED.VERSIONor image tag change; the release PR does that.Upgrade notes for on-prem customers
currents/on-prem/ai-queue-workerrepository to your ECR policy and mirror the image with the others.LLM_PROVIDER_URLandLLM_API_KEYin.envif you use AI..envsetsAI_QUEUE_WORKER_ENABLED=true, also setSLACK_AI_CALLBACK_WORKER_ENABLED=trueif you use Slack AI, and keep the first variable for the director's AI indexes.Checked
docker compose -f docker-compose.{full,database,cache}.yml config --quietwith a minimal.env, as the validate workflow does: all three pass.scripts/sync-templates.sh: the committed files match the templates.schedulerandapi, so it does not start the new service).Checklist
(fix|feat|chore): title [CSR-xxx]🤖 Generated with Claude Code
https://claude.ai/code/session_011baD3izoabUn31Y3WeQHMp