ci(deploy-examples): include avatar deployment#1599
ci(deploy-examples): include avatar deployment#1599rosetta-livekit-bot[bot] wants to merge 1 commit into
Conversation
|
|
|
||
| - name: Prepare deploy directory | ||
| env: | ||
| AGENT_ID: ${{ secrets[matrix.agent_id_secret] }} |
| case "${{ matrix.example }}" in | ||
| avatar) | ||
| keys="LEMONSLICE_API_KEY" | ||
| ;; | ||
| *) | ||
| keys="" | ||
| ;; | ||
| esac |
There was a problem hiding this comment.
🟡 OPENAI_API_KEY pulled into env but never written to secrets file for any example
The Build secrets file step maps OPENAI_API_KEY from GitHub secrets into the shell environment (line 93), but the case statement (lines 100-107) never adds it to .env.deploy for any example — the wildcard *) branch sets keys="". The frontdesk and drive-thru examples directly instantiate new openai.LLM(...) (examples/src/frontdesk/frontdesk_agent.ts:225 and examples/src/drive-thru/drivethru_agent.ts:389), which reads OPENAI_API_KEY from the environment at runtime. Unless this key is separately configured at the LiveKit Cloud project level, those deployed agents will fail when attempting OpenAI API calls. At minimum, OPENAI_API_KEY in env: is dead code if intentionally managed elsewhere, or a missing case entry if it was intended to be passed through the secrets file.
Prompt for agents
In the 'Build secrets file' step of deploy-examples.yml, the OPENAI_API_KEY is pulled from GitHub secrets into the env block (line 93) but never written to .env.deploy. The case statement at lines 100-107 only adds LEMONSLICE_API_KEY for the avatar example and sets keys to empty for all others.
The frontdesk example (examples/src/frontdesk/frontdesk_agent.ts) and drive-thru example (examples/src/drive-thru/drivethru_agent.ts) both directly instantiate openai.LLM, deepgram.STT, and elevenlabs.TTS plugins, which require OPENAI_API_KEY, DEEPGRAM_API_KEY, and ELEVENLABS_API_KEY respectively in the runtime environment.
Either:
1. Add appropriate case entries for frontdesk and drive-thru to include OPENAI_API_KEY (and potentially DEEPGRAM_API_KEY, ELEVENLABS_API_KEY) in keys, or
2. If these are managed at the LiveKit Cloud project level, remove the unused OPENAI_API_KEY from the env block to avoid confusion, or
3. Refactor frontdesk and drive-thru examples to use inference gateway strings (like survey_agent.ts does) so they don't need local API keys.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
The avatar example shipped in #5834 was intentionally left out of the CI deploy matrix while its secret-provisioning story was pinned down — that's why the workflow runs for the avatar PR didn't actually push a new build of the agent.
This adds `avatar` to the matrix and plumbs `LEMONSLICE_API_KEY` through the same `.env.deploy` secrets-file mechanism healthcare uses for `OPENAI_API_KEY`.
Prereq
`LEMONSLICE_API_KEY` needs to be set as a GitHub Actions secret on the repo (settings → Secrets and variables → Actions) before the next deploy. Today it's only set per-agent via `lk agent update-secrets` for local out-of-band deploys.
Test plan