Refuse to start the built-in Bot without a model key, so the healthcheck stops passing a Bot that cannot answer - #99
Merged
Conversation
…eck stops passing a Bot that cannot answer
jeonjw85
requested review from
MikeRyanDev,
davidmckayv,
guidovizoso and
tylerslaton
as code owners
August 21, 2026 19:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #98.
What this changes
The built-in Bot now refuses to start when
OPENAI_API_KEYis missing or empty, the same posture the LangGraph Bot already has and the same file already applies toMANAGED_AGENT_TOKEN. Until now it started, answered the healthcheck, and then failed every conversation, so a missing key looked like a healthy deployment: compose reportedUp (healthy)for the built-in Bot while the LangGraph Bot sat atExited (1)for the same missing variable.The check runs at startup rather than on the first run, so the failure lands in front of whoever is deploying. Two tests spawn the real entrypoint with the environment compose hands it (an unset key arrives as an empty string through
${OPENAI_API_KEY:-}) and pin both refusals.Where it runs
Boundary and audit
Changelog
CHANGELOG.mdunderUnreleased, inUpgrading: a deployment that ran the built-in Bot without a key now sees it refuse to start instead of reporting healthy.Verification
bun test tests/agent-bot.test.ts: 2 pass.bunx biome formatandbunx biome lintclean on the changed files;tsc --noEmit --strictclean on both.agent-botkeeps its own lockfile and is not a root workspace, and the new tests spawn its real entrypoint.