Repository navigation
Offer Fable 5.1 in the Claude Code model picker - #2833
Merged
Merged
Conversation
Claude Code 2.1.257 replaced claude-fable-5 with claude-fable-5-1. BB's curated Claude catalog is hardcoded and unconditional, so the picker kept offering the retired claude-fable-5 row, which the CLI now rejects. Fable 5.1 reached the list only through the additive discovery path: it landed below Sonnet 5 under the CLI's own bare label, "Fable". The 1M-context model set also missed the new ids, so BB reported a 200k context window for models that carry a native 1M window and no [1m] suffix. Promote claude-fable-5-1 to the curated catalog in place of claude-fable-5, which also fixes the server-side fallback list derived from the same data. Add the Fable 5.1 and Mythos ids to LARGE_CLAUDE_CONTEXT_MODELS. Drop the two alias descriptions that pinned Fable to version 5. Fixes #2825 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
SawyerHood
added a commit
that referenced
this pull request
Sep 22, 2026
…4084) ## Human comments ## What was wrong The Claude Code model picker was a hardcoded catalog (`model-catalog-data.ts`) with Claude Code's reported models appended after it. When Claude Code 2.1.280 made `claude-opus-5-5[1m]` its default, BB did pick it up, but it landed sixth in the list under Claude Code's alias label, "Opus (1M context)". The stale hardcoded "Opus 5 (1M)" stayed at the top. Every model release needed a manual catalog edit to look right (#2833 was the last one, for Fable 5.1). ## What changed - `plugins/provider-claude-code/src/model-list.ts`: the picker is built only from Claude Code's `initializationResult().models`, in Claude Code's order, one entry per resolved model id. - **Names:** display names are derived from the model id (`claude-opus-5-5[1m]` → "Opus 5.5 (1M)", `claude-haiku-4-5-20251001` → "Haiku 4.5"). Ids that don't match the `claude-<family>-<major>[-<minor>]` pattern keep Claude Code's own label. - **Aliases:** Claude Code's aliases (`opus[1m]`, `sonnet`, …) become selected-only entries, labeled "<name> alias". - **Default:** Claude Code's reported default model, falling back to the first entry. - **Reasoning efforts:** taken from `supportedEffortLevels`, with `xhigh` also offering `ultracode`, as before. - Deleted `model-catalog-data.ts`, `model-catalog.ts` and `model-catalog.test.ts`, along with the legacy selected-only catalog. - `plugins/provider-claude-code/server.ts`: dropped `models.fallback`. BB already stores the last good catalog per host and serves it when a later probe fails, so the static list only showed up when a host's very first probe failed. - `plugins/provider-claude-code/src/bridge/model-list.ts`: an empty model report now throws, so it counts as a failed probe instead of overwriting the stored catalog with nothing. - Server tests that pinned the Claude fallback catalog now check the generic `models.fallback` path with a test provider, and expect no fallback models for Claude Code. No wire change: the model-list shape is unchanged, so `HOST_DAEMON_PROTOCOL_VERSION` stays put. No CLI, guide or plugin API change. **Behavior changes to be aware of:** - **Older models leave the picker.** Claude Code only reports its current models, so Opus 5, 4.8 and 4.7 and old aliases like `opus`, `best` and `fable` are no longer listed. Threads and project defaults on those models recover to the default in the composer, and the next UI send switches them. - **Updates to those models are rejected.** `bb thread update --model <dropped id>` returns 400, and workflow literal selections naming a dropped model fail validation. `bb thread spawn --model <id>` still works because spawn doesn't check the catalog. - **Default effort is now "high".** It used to be "medium" for Opus 4.7 and Sonnet 5, and it only applies when no effort preference is saved. - **First probe failure leaves the picker empty.** If a host's very first probe fails, the picker shows the load error instead of a static list. - **Context-window hints stay hardcoded.** `LARGE_CLAUDE_CONTEXT_MODELS` in `sdk-extraction.ts` is untouched, because Claude Code's model report carries no context window. ## How you verified - `pnpm exec turbo run test typecheck --filter=bb-plugin-provider-claude-code`: 363 tests pass. New `model-list.test.ts` cases cover Claude Code's order, derived names, aliases as selected-only entries, effort mapping, and following a changed default. `bridge.test.ts` covers the empty report being treated as a failure. - `pnpm exec turbo run test typecheck --filter=@bb/server`: all passing except `test/public/machine-environment.test.ts`, which hit its 5 s timeout under full-suite load and passes when run alone. - Fed the real Claude Code 2.1.280 probe through the bridge. On a dev app, `GET /api/v1/system/execution-options?providerId=claude-code` returns exactly Opus 5.5 (1M) (default), Fable 5.1, Sonnet 5 and Haiku 4.5, with the four aliases as selected-only entries. The model picker in the dev app UI shows the same list. > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.
Human comments
What was wrong
Claude Code 2.1.257 replaced
claude-fable-5withclaude-fable-5-1. BB's curated Claude catalog is hardcoded and unconditional (CLAUDE_CODE_ACTIVE_CATALOG_DATA), so the picker kept offering the retiredclaude-fable-5row, which the CLI now rejects, while Fable 5.1 reached the list only through the additive discovery path inbuildClaudeCodeModels— appended below Sonnet 5, carrying the CLI's own baredisplayName, "Fable".LARGE_CLAUDE_CONTEXT_MODELSalso missed the new ids; Fable and Mythos carry a native 1M window with no[1m]suffix to fall back on, soresolveClaudeModelContextWindowHintreturned 200k and the context meter under-reported by 5x.I confirmed the rename directly against both binaries on this machine. Claude Code 2.1.252 reports
claude-fable-5[1m]→claude-fable-5; 2.1.257 reportsclaude-fable-5-1[1m]→claude-fable-5-1. The CLI's own baked-in catalog givesclaude-fable-5-1display_name: "Fable 5.1"andcontext: {window: 1e6, native_1m: true}with nosupports_1m_suffix, andclaude-mythos-5-1the same shape.What changed
plugins/provider-claude-code/src/model-catalog-data.ts—claude-fable-5-1/ "Fable 5.1" replaces the retiredclaude-fable-5entry in the curated catalog. This also fixes the server-side fallback list, becauseplugins/provider-claude-code/server.tsprojectsmodels.fallbackfrom the same data.plugins/provider-claude-code/src/sdk-extraction.ts—claude-fable-5-1,claude-mythos-5-1, andclaude-mythos-5joinLARGE_CLAUDE_CONTEXT_MODELS.plugins/provider-claude-code/src/model-list.ts— thebestandfablealias descriptions no longer pin Fable to version 5.No wire change, so
HOST_DAEMON_PROTOCOL_VERSIONstays put: the model list's shape is unchanged and only its values move. No CLI, guide, or plugin API surface changed.Two deviations from the issue's proposed fix:
modelIsDiscovered(entry.model, …) && !models.some(…)), and on a CLI that still offers Fable 5 the discovery loop already pushesclaude-fable-5intomodels, which filters the selected-only row out. The entry would be unreachable in every case, and the case it was meant to cover — an existing selection while the CLI still offers the model — is already covered by discovery.buildClaudeCodeModelsalready surfaces it through the discovered-passthrough path with Anthropic's own label for entitled accounts, and the existing test asserting BB never invents a Mythos row still passes.claude-mythos-5joins the 1M set alongsideclaude-mythos-5-1, since it carries the identical native 1M window and the same latent 5x under-report.The issue's closing note — reading display names, context windows, and effort levels from the probe instead of restating them — is the design change that would retire this class of drift. It is deliberately out of scope here; the issue flags it as a separate decision.
How you verified
pnpm exec turbo run test typecheck --filter=bb-plugin-provider-claude-code— 337 tests pass, typecheck clean.model-list.test.ts,sdk-extraction.test.ts, andbridge.test.tscarried the oldclaude-fable-5expectations and fail before this change.pnpm exec turbo run test typecheck --filter=@bb/server— 2120 tests pass, typecheck clean.execution-options.test.tspins the fallback catalog and fails before this change.buildClaudeCodeModels: the list now startsclaude-fable-5-1 | Fable 5.1, with no duplicate row for the discovered entry, andresolveClaudeModelContextWindowHint("claude-fable-5-1")returns 1000000.model: "claude-fable-5-1". The init message echoesclaude-fable-5-1and the turn completes, so the promoted id is one the CLI accepts.Fixes #2825