Repository navigation
ci: pin Claude Code's small/fast model to a group the gateway serves - #24
Merged
Merged
Conversation
Claude Code keeps a separate "small/fast" model slot for background work -- session titles, compaction summaries, quick classifiers. Unset, the CLI asks for its own default haiku id, which this gateway does not register, so those calls 404 and the CLI retries them with exponential backoff. That backoff is what turned a previous run into ~4.6 min of pure sleep per affected call. Measured against a recording endpoint, a plain `-p` run issues exactly one request and it uses the main model, so the slot is not hit on every run: this is insurance, not a fix for an observed failure. It is worth taking anyway because the downside is minutes of wall clock inside a job that is already timeout-bounded, and the cost is two env lines. Both names are set because both are still read by the CLI (2.1.259): ANTHROPIC_DEFAULT_HAIKU_MODEL is the current one, ANTHROPIC_SMALL_FAST_MODEL the legacy alias. Each falls back to the agent pin, so the workflow is correct with no new secret; set ANTHROPIC_SMALL_FAST_MODEL later to point background calls at a cheaper group than the agent's without editing this file. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DobwJ8YTnfowwqwhspU1kQ
aroff
enabled auto-merge (squash)
September 4, 2026 19:57
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.
Claude Code keeps a separate small/fast model slot for background work — session titles, compaction summaries, quick classifiers. Unset, the CLI asks for its own default haiku id, which this gateway does not register, so those calls 404 and the CLI retries them with exponential backoff. That backoff is what turned a previous run into ~4.6 min of pure sleep per affected call.
This is insurance, not a fix for an observed failure
Measured against a recording endpoint with three distinct model ids, a plain
-prun issued exactly one request — the main model,thinking: adaptive, 26 tools — and never touched the small/fast slot. So it is not hit on every run.Worth taking anyway: the downside is minutes of wall clock inside an already timeout-bounded job, and the cost is two env lines that cannot be wrong.
Why both names
Both are still read by the CLI (verified in the 2.1.259 binary):
ANTHROPIC_DEFAULT_HAIKU_MODELis the current name,ANTHROPIC_SMALL_FAST_MODELthe legacy alias.Each falls back to
LLM_GATEWAY_MODEL, so the workflow is correct with no new secret — today that resolves totools-advanced, which is measured as serving every request shape Claude Code sends. SettingANTHROPIC_SMALL_FAST_MODELlater repoints background calls at a cheaper group without editing this file.Scope
One
env:block in thelive-evaljob. No behaviour change on the PR path —validateandscore-fixturesdo not run the sweep.🤖 Generated with Claude Code
https://claude.ai/code/session_01DobwJ8YTnfowwqwhspU1kQ