chore(deploy): wire OPENAI_API_KEY + LLM_ENABLED for LLM chat activation (#960) #1178
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#1178
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "chore/deploy-llm-env-960"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Wires
OPENAI_API_KEY+LLM_ENABLEDinto the prod deploy so the LLM chat (#960/#957) can be activated by setting two Forgejo Actions values — no code change, no literal key.OPENAI_API_KEY(Forgejo secret, sensitive) +LLM_ENABLED(Forgejo variable, bool) → forwarded into the SSH deploy (env:+envs:list) → written tobackend/.env.runtime(shared by backend+worker+beat), mirroring the existingOBJECTIVE_API_KEYwiring..env.runtimewrite is wrapped in[ -n "${VAR:-}" ], so an UNSET secret/var writes nothing → app keepsllm_enabled=False/openai_api_key=None. The LLM path can't activate accidentally — both must be deliberately set.${{ secrets.* }}/${{ vars.* }}refs). Compose header documents both as optional.Test plan
yaml.safe_loadboth files); remotescript:passessh -n(POSIX syntax)envs:list /.env.runtimewrite) — no silent drop-to-remoteset -euo pipefail(${VAR:-}default)envs:line changed + new blocks appended); no literal secretTo activate (your action — I can't set secrets/keys)
Forgejo repo → Settings → Actions:
OPENAI_API_KEY=<the test key>LLM_ENABLED=trueActivates on the next deploy. Until both set → chat keeps working on the deterministic path. (Note: merging THIS PR triggers a deploy that runs the new wiring; with the secrets unset it writes nothing → still dormant.)
Refs #960