feat(models): add Fable 5 as a selectable Anthropic model - #995
Merged
Conversation
Add Fable 5 as a new Opus-class Anthropic model, selectable in the picker without changing the default (Opus 4.8 stays default). Mirrors the Opus 4.8 transition but for a brand-new, non-aliased name with a 1M-context variant. - modelRegistry: add `claude-fable-5` (200K) and `claude-fable-5[1m]` (1M) entries plus the 1M -> 200K fallback. The `[1m]` suffix lets `is1mContextModel` classify the 1M variant with no special case. - modelCapabilities: Fable 5 joins the effort, xhigh, and max sets (not fast — fast mode is Opus-4.6-only). - pricing: `claude-fable-5` at $30/$150 per Mtok (2x Opus). The prefix `starts_with` lookup means one entry also covers the `[1m]` variant. - Refresh the `xhigh requires Opus 4.7+` strings (CLI help, command palette) to include Fable 5. - Docs: model table, default-model row, and `--model` flag examples. The concrete `claude-` prefixed id passes the `is_claude_code_model_alias` gate for free, so no Rust routing/validation or default-model changes are required — the id flows verbatim to the Claude CLI `--model` arg and every picker/slash-command surface renders it from the registry.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Anthropic Claude Fable 5 (200K + [1m] variant) as a selectable Claude Code model across the UI/CLI surfaces, including capability gating (effort/xhigh/max), 1M→non‑1M fallback behavior, pricing for local aggregation, and docs/help-text updates—without changing the default model.
Changes:
- Register
claude-fable-5andclaude-fable-5[1m]in the UI model registry, including a 1M fallback mapping and coverage in registry tests. - Extend model capability allow-lists so Fable 5 supports effort + xhigh + max (but not fast), with targeted unit tests.
- Add pricing lookup entry + test, and update CLI/help/docs strings to include Fable 5 in model/effort guidance.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/usage/pricing.rs | Adds pricing table entry for claude-fable-5 (covers [1m] via prefix match) and a test. |
| src/ui/src/components/command-palette/commands.ts | Updates effort command description text to include Fable 5 for XHigh. |
| src/ui/src/components/chat/modelRegistry.ts | Adds Fable 5 (200K + 1M) to MODELS and adds [1m] fallback mapping. |
| src/ui/src/components/chat/modelRegistry.test.ts | Pins fallback behavior for claude-fable-5[1m] in tests. |
| src/ui/src/components/chat/modelCapabilities.ts | Adds Fable 5 ids to effort/xhigh/max supported sets. |
| src/ui/src/components/chat/modelCapabilities.test.ts | Adds tests ensuring Fable 5 supports effort/xhigh/max and does not support fast mode. |
| src-cli/src/commands/chat.rs | Updates --effort help text to include Fable 5 for xhigh eligibility. |
| site/src/content/docs/features/settings.mdx | Updates the Settings reference to list Fable 5 in the “Default model” description. |
| site/src/content/docs/features/cli-client.mdx | Updates CLI docs: --model examples and --effort xhigh note include Fable 5. |
| site/src/content/docs/features/agent-configuration.mdx | Documents Fable 5 model IDs and updates XHigh availability text. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #995 +/- ##
=======================================
Coverage 81.00% 81.00%
=======================================
Files 123 123
Lines 46958 46965 +7
=======================================
+ Hits 38039 38046 +7
Misses 8919 8919 🚀 New features to boost your workflow:
|
…able The Reasoning Effort table's Max row still read "Opus and Sonnet", but Fable 5 was added to MAX_EFFORT_MODELS, making the docs inaccurate (flagged in PR review). Fable 5 is a new model family not covered by "Opus"/"Sonnet", and it supports effort generally, so list it in the Low/Medium/High/Max rows too for consistency with the already-updated XHigh row.
2 tasks
11 tasks
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.
Summary
Adds Fable 5 as a new Opus-class Anthropic model, selectable in the picker without changing the default (Opus 4.8 stays the default). This mirrors the prior Opus 4.8 transition, but for a brand-new, non-aliased name that also ships a 1M-context variant.
MODELSentries:claude-fable-5(200K) andclaude-fable-5[1m](1M), plus aNON_1M_FALLBACKSmapping for the 1M → 200K fallback.claude-fable-5at $30 / $150 per Mtok (2× Opus), for local cost aggregation (e.g. via Pi).--modelflag examples, and thexhigh requires Opus 4.7+strings (CLI help + command palette) now include Fable 5.The key design choice is the concrete id
claude-fable-5(no barefablealias). Because it starts withclaude-, it passes the one hard allow-list gate (is_claude_code_model_aliasingateway_translate.rs) for free — so no Rust routing/validation or default-model changes were needed. The id flows verbatim to the Claude CLI--modelarg, and every picker //model/ command-palette surface renders it automatically from the registry.flowchart LR A["claude-fable-5 in MODELS"] --> B["buildModelRegistry()"] B --> C["Picker / /model / palette<br/>(auto-render)"] A --> D["--model claude-fable-5"] D --> E{"is_claude_code_model_alias?"} E -->|"starts_with('claude-') ✓"| F["Claude CLI resolves it"] A --> G["modelCapabilities Sets<br/>effort / xhigh / max"] A --> H["pricing.rs prefix lookup<br/>covers [1m] too"]Complexity Notes
modelCapabilities.tsstill works, but its effort/xhigh UI silently disappears. Fable 5 is added to EFFORT, XHIGH, and MAX (both the bare and[1m]ids), with matching tests pinning the exact profile — including an explicitisFastSupported('claude-fable-5') === falseto lock in the "no fast mode" decision.pricing::lookupmatches bystarts_with, soclaude-fable-5[1m]resolves to the sameclaude-fable-5row. A test asserts both.[1m]suffix, not a bare alias. Unlike theopusalias (whose id lacks[1m]and needs a special case inis1mContextModel), the suffixed id is detected automatically.Test Steps
cd src/ui && bun run test— registry + capability suites pass (73 in those two files; 2809 total).cd src/ui && bunx tsc -b— exits 0.cargo test -p claudette pricing— includeslookup_fable_5_priced_at_2x_opus(asserts $30/$150 and thatclaude-fable-5[1m]resolves).cargo fmt --all --check,RUSTFLAGS="-Dwarnings" cargo clippy -p claudette -p claudette-cli --all-targets --all-features,cd src/ui && bun run lint:css— all clean./model claude-fable-5resolves the same way.Checklist