Claude Fable 5.1 in Claude Code: How to Switch, Pin, and Pay Less

TL;DR
Claude Code v2.1.257 points /model fable at Fable 5.1: 1M context, $10/$50 per MTok, $0.25 cache reads. Setup, gotchas, and when Opus 5.5 wins.
Last updated: October 17, 2026
Since Claude Code v2.1.257, which shipped with the September 1, 2026 model launch, /model fable and claude --model fable run Claude Fable 5.1 (claude-fable-5-1) instead of Fable 5. The per-token price is the same as Fable 5 ($10 input, $50 output per million tokens), but cache reads drop from $1 to $0.25 per million, and long Claude Code sessions are mostly cache reads. Verdict: use Fable 5.1 for long, ambiguous, multi-hour work, and keep Opus 5.5 (the default, $4/$20) for everything else, which is also what Anthropic recommends.
One clarification before the how-to. "Default Fable" means the model behind the fable alias. Fable is still not the account-type default on any plan or provider, so you opt in yourself. If you need the general access paths (plans, API, Bedrock, Vertex, Foundry), How to Use Claude Fable 5 covers them. This post covers the Claude Code mechanics and the API changes that come with 5.1.
What changed, version by version#
Fable 5.1 support arrived over several Claude Code releases. These are the entries from the official changelog that matter:
| Version | What changed |
|---|---|
| 2.1.257 | Added Claude Fable 5.1 (claude-fable-5-1) as the default Fable model: 1M context, $10/$50 per Mtok, $0.25/Mtok cache reads. In Claude apps gateway sessions, fable and best keep resolving to Fable 5 for now. Added s in /effort (and the /model picker) to change effort for the current session only. Added CLAUDE_CODE_SUBAGENT_MODEL_FORCE. |
| 2.1.260 | The /model picker now shows Fable 5.1 for organizations that can use it (before, it only worked when typed as /model claude-fable-5-1). Fixed prompt caching not covering context attached after tool results, which had been re-sent uncached on every tool-call turn. /effort on Fable 5.1 no longer invalidates the prompt cache mid-session. Fixed model: fable agents ignoring the [1m] tag on an ANTHROPIC_DEFAULT_FABLE_MODEL pin. |
| 2.1.277 | Fable always appears in /model on the Anthropic API. It is greyed out only when your organization's settings disable it. |
| 2.1.287 | Picking Fable in /model on a claude.ai login no longer saves the current version's ID. Your saved default follows the newest Fable, the same way Opus and Sonnet do. |
| 2.1.301 | The fable and best aliases no longer error on the Anthropic API when the newest Fable is not available to your organization. Claude Code retries once on the previous Fable model. |
The 2.1.260 caching fix matters for cost. Before 2.1.260, context attached after tool results was re-sent as uncached input on every tool-call turn, billed at $10 per million instead of $0.25. If you are below 2.1.260, run claude update before you judge what Fable 5.1 costs you. Below 2.1.257 there is no Fable 5.1 at all.
How the fable alias resolves#
Claude Code has three names that can land on Fable:
fableresolves to Fable 5.1, unless you setANTHROPIC_DEFAULT_FABLE_MODELor you are in a Claude apps gateway session, where it resolves to Fable 5. Per the model configuration docs, a gateway that isn't configured forclaude-fable-5-1rejects requests for it, so the alias stays on 5 there until your admin is ready.bestuses whateverfableresolves to where Fable is available, and otherwise the same model asopus.- A full model ID (
claude-fable-5-1orclaude-fable-5) skips the alias entirely. This is how you reach a specific version on purpose.
%% title: How Claude Code resolves the fable alias
flowchart TD
A["/model fable or --model fable"] --> B{"ANTHROPIC_DEFAULT_FABLE_MODEL set?"}
B -- yes --> C["Pinned model ID"]
B -- no --> D{"Claude apps gateway session?"}
D -- yes --> E["Fable 5 (claude-fable-5)"]
D -- no --> F["Fable 5.1 (claude-fable-5-1)"]
F --> G{"Org can use Fable 5.1?"}
G -- yes --> I["Runs on Fable 5.1, 1M context"]
G -- no --> H["v2.1.301+: retry once on previous Fable"]There is one automatic migration to know about. If your user settings hold claude-fable-5 or claude-fable-5[1m], for example because you picked Fable in /model before v2.1.257, Claude Code rewrites that value to the fable or fable[1m] alias the first time you run v2.1.257 or later on the Anthropic API. The startup model line shows (auto-updated) once. A claude-fable-5 value in project, local, or managed settings is left alone, so a repo that pins Fable 5 in .claude/settings.json stays on Fable 5 until someone changes it.
How to use Fable 5.1 in Claude Code#
These steps come from the Claude Code model configuration and environment variable docs. The flags were checked against claude --help on Claude Code 2.1.302, which lists both --model and --effort.
1. Upgrade and check the version. Fable 5.1 needs v2.1.257 or later, and you want at least 2.1.260 for the caching fix.
claude update
claude --version # needs 2.1.257+, ideally 2.1.260+
2. Select it. In a running session, type /model fable. To start a session on it, launch with the flag:
claude --model fable
Choosing a Fable model with /model saves it as your selected model in user settings, so later sessions start on it too. In a Claude apps gateway session, where the alias still means Fable 5, type /model claude-fable-5-1 instead (only works if your gateway serves it).
3. Set effort for this session only (optional). Fable 5.1 defaults to high effort in Claude Code. To change it without saving a new default, open /effort, pick a level, and press s instead of Enter. Or set it at launch:
claude --model fable --effort xhigh
What each level costs and when to use it is in Fable 5 effort levels explained. The Claude Code detail worth knowing: since v2.1.260, changing effort mid-session on Fable 5.1 keeps the prompt cache warm, so stepping down to medium for a routine follow-up doesn't cost you a cache rebuild.
4. Pin it for a team or a third-party provider. ANTHROPIC_DEFAULT_FABLE_MODEL sets the model behind fable. On Bedrock, Google Cloud, or Foundry it is also the ID Claude Code recognizes as a Fable model for automatic fallback, so set it there even if the alias would otherwise work.
# Anthropic API
export ANTHROPIC_DEFAULT_FABLE_MODEL='claude-fable-5-1'
# Amazon Bedrock uses the anthropic. prefix
export ANTHROPIC_DEFAULT_FABLE_MODEL='anthropic.claude-fable-5-1'
# Optional: put every subagent on one model (v2.1.257+)
export CLAUDE_CODE_SUBAGENT_MODEL='opus'
export CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1
The last two lines are a cost lever. CLAUDE_CODE_SUBAGENT_MODEL sets the default model for subagents, and CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1 makes it apply to every subagent, ignoring per-spawn and agent-definition overrides. That lets the main thread run on Fable 5.1 while delegated work runs on something cheaper.
5. Stay on Fable 5 on purpose. Use /model claude-fable-5 or claude --model claude-fable-5 on the Anthropic API, or keep claude-fable-5 in project, local, or managed settings, which are not migrated.
6. Confirm it worked. Check the model name on the startup line (and the one-time (auto-updated) note if your user settings held Fable 5). Run /usage to see the weekly Fable limit on plans that have one.
Gotchas and limits in Claude Code#
- Usage credits, and headless runs. Depending on plan and seat tier, Fable usage can bill to usage credits instead of your plan's included limits. The
/modelrow then says "Requires usage credits". Interactive sessions show a consent prompt first (Enterprise members with organization billing don't see it). In-pnon-interactive mode, and in Agent SDK apps that don't show the prompt, Claude Code bills usage credits without asking. Check this before you put--model fablein a CI job or a cron script. - 1M context by default. Fable models run with the 1M window on every provider, including Bedrock, Google Cloud, Foundry, and gateway sessions, with no
[1m]suffix. Sessions auto-compact at about 967K tokens. SetCLAUDE_CODE_DISABLE_1M_CONTEXT=1to hold sessions at 200K. - Thinking stays on. You can't turn thinking off on Fable models in Claude Code. The toggle shows "Thinking can't be turned off", and
alwaysThinkingEnabled: falseorMAX_THINKING_TOKENS=0has no effect. Effort is the only control. - The old
effortLevelkey still applies. A top-leveleffortLevelin your user settings still applies to Fable 5.1, but not to Opus 5.5, which starts at its ownmediumdefault. If you seteffortLevel: "xhigh"a long time ago and forgot, Fable 5.1 sessions are running atxhigh. maxdoesn't stick. Claude Code appliesmaxto the current session only, unless you set it throughCLAUDE_CODE_EFFORT_LEVEL.- Zero data retention. Fable 5.1 is a Covered Model with 30-day retention. Per the what's new page, it is not available under ZDR unless Anthropic has expressly authorized it. In Claude Code, an organization that can't use Fable sees the row greyed out with a note explaining why.
Content-based fallback#
Fable 5.1, Fable 5, and Opus 5.5 run safety classifiers. When one flags a request, Claude Code re-runs it on a different model: biology-flagged requests go to Opus 5, and cybersecurity-flagged requests go to Opus 4.8. The part people miss is that the session stays on the fallback model until you run /model. Claude Code also keeps the effort level the flagged request ran at.
%% title: Content-based fallback from Fable 5.1 in Claude Code
sequenceDiagram
participant U as You
participant CC as Claude Code
participant F as Fable 5.1
participant O as Opus fallback
U->>CC: Prompt
CC->>F: Request
F-->>CC: Refusal (cyber or bio)
CC->>O: Re-run (cyber: Opus 4.8, bio: Opus 5)
O-->>CC: Response
CC-->>U: Answer plus transcript notice
Note over CC,O: Session stays on fallback until you run /modelOn third-party providers, fallback only works if Claude Code recognizes the current model as Fable (another reason to set ANTHROPIC_DEFAULT_FABLE_MODEL) and an Opus target resolves in your deployment.
Anthropic's announcement says Claude Code users can expect around 60% fewer interventions per session from its cyber safeguards compared with the previous safeguards on Fable 5. It also says Fable 5.1 may now be used to find software vulnerabilities, but not to develop exploits. Both are Anthropic's claims, not measurements we have reproduced. Refusal handling in your own code is covered in the API section below and in the fallback post linked at the end.
Using claude-fable-5-1 in your own code (API)#
If you call the API directly, moving from claude-fable-5 to claude-fable-5-1 is more than a string change. The what's new page lists three breaking changes from Fable 5, plus behavior shifts. (For the earlier Opus 4.8 to Fable 5 changes, see Migrating to Claude Fable 5.)
- Change the model ID to
claude-fable-5-1(Bedrock:anthropic.claude-fable-5-1). - Remove forced tool use.
tool_choiceof typeanyortoolnow returns a 400:tool_choice: type "tool" and "any" are not supported for this model.The token counting endpoint applies the same check. Anthropic's reasoning: thinking is always on, and a forced call would skip it, so the model would do its working-out inside the tool arguments. Usetool_choice: {type: "auto"}withstrict: truetools, or structured outputs. - Keep history append-only. Only Fable 5.1 and Mythos 5.1 can read Fable 5.1 thinking blocks; other models drop them unbilled. And editing anything before a Fable 5.1 thinking block (the system prompt, the tools array, an earlier message) invalidates it.
- Re-tune effort. The API default is
high. Anthropic's migration checklist says to re-tune from there and to consider changing effort mid-conversation instead of holding one level for a whole session. - Watch tool batching. Fable 5.1 may issue one tool call per turn where Fable 5 batched several. If your agent loop slows down, add a prompt line telling it to batch independent reads.
The history check has an enforcement cutoff:
%% title: Why edited history breaks Fable 5.1 thinking blocks
flowchart LR
A["Fable 5.1 thinking block in turn N"] --> B{"Anything before it changed?"}
B -- "No, append-only" --> C["Block replayed, cache stays warm"]
B -- "Yes, edited system, tools or turn" --> D{"Account created on or after Aug 31, 2026?"}
D -- Yes --> E["400: bound to a different conversation"]
D -- No --> F["Mismatch recorded, acted on only if opted in"]For accounts created on or after August 31, 2026, a replayed block with an edited prefix fails with a 400 whose message says The block is bound to a different conversation. Older accounts get the mismatch recorded, and the API acts on it only if the request sets thinking.block_binding.prefix_mismatch_behavior (for example "drop_block" under the thinking-binding-controls-2026-08-01 beta header). Claude Code, claude.ai, Managed Agents, and the Claude Agent SDK keep the prefix intact for you. Only code that builds the messages array itself needs the check. Common causes are per-turn reminders injected into an earlier turn and then removed, and system prompts or tool lists rebuilt between requests.
Example: a streamed call with server-side fallback#
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
const stream = client.beta.messages.stream({
model: "claude-fable-5-1",
max_tokens: 64000,
output_config: { effort: "high" },
thinking: { type: "adaptive", display: "summarized" },
betas: ["server-side-fallback-2026-07-01"],
fallbacks: "default",
messages: [
{ role: "user", content: "Find the root cause of the flaky checkout test." },
],
});
const message = await stream.finalMessage();
if (message.stop_reason === "refusal") {
console.error("Declined:", message.stop_details?.category ?? "unknown");
} else {
for (const block of message.content) {
if (block.type === "text") console.log(block.text);
}
}
console.log("served by", message.model);
console.log("cache reads", message.usage.cache_read_input_tokens);
fallbacks: "default" with the server-side-fallback-2026-07-01 header retries a declined request on the model Anthropic recommends for that refusal category, inside the same call. Per the refusals and fallback docs, it isn't supported on the Batches API and isn't available on Bedrock, Google Cloud, or Foundry, where the SDK middleware is the alternative. The permitted fallback targets for Fable 5.1 are Opus 4.8 and Opus 5. Logging message.model tells you which model actually answered, and cache_read_input_tokens tells you whether your cache is working. Thinking display defaults to "omitted", so set "summarized" if you show reasoning to users.
Example: drop effort mid-conversation without a cache reset#
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
const history: Anthropic.Beta.BetaMessageParam[] = [
{ role: "user", content: "Plan the migration of the billing module." },
{ role: "assistant", content: "Here is the plan..." },
];
const response = await client.beta.messages.create({
model: "claude-fable-5-1",
max_tokens: 16000,
betas: ["mid-conversation-output-config-2026-07-01"],
messages: [
...history,
// Effort-only system message: drops effort from here on, no cache reset
{ role: "system", content: [], output_config: { effort: "low" } },
{ role: "user", content: "Now rename the helper in utils.ts." },
],
});
console.log(response.stop_reason);
This is the API version of what /effort does in Claude Code. The effort-only system message (empty content) changes effort from that point on, and the earlier prefix stays cached. Fable 5 doesn't support it.
Example: replace forced tool use#
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
const recordFinding: Anthropic.Tool = {
name: "record_finding",
description: "Record one code review finding.",
strict: true,
input_schema: {
type: "object",
properties: {
file: { type: "string" },
line: { type: "integer" },
summary: { type: "string" },
},
required: ["file", "line", "summary"],
additionalProperties: false,
},
};
const response = await client.messages.create({
model: "claude-fable-5-1",
max_tokens: 16000,
tools: [recordFinding],
// Forced tool use ({ type: "tool" } or { type: "any" }) returns 400 on Fable 5.1
tool_choice: { type: "auto" },
messages: [
{
role: "user",
content:
"Review this diff. Report each finding by calling record_finding.\n\n<diff>...</diff>",
},
],
});
for (const block of response.content) {
if (block.type === "tool_use") console.log(block.input);
}
strict: true keeps the arguments schema-valid, and naming the tool in the prompt replaces the force. If the forced call only existed to get JSON back, structured outputs (output_config.format) is the cleaner fix.
All three examples were type-checked against @anthropic-ai/sdk@0.135.0 with TypeScript 7.0.2 (strict, moduleResolution: bundler). They were not run against the live API.
Some things haven't changed from Fable 5: disabling thinking or sending budget_tokens returns a 400, prefill returns a 400, non-default temperature/top_p/top_k return a 400, and the minimum cacheable prompt is 512 tokens. Fable 5.1 also adds a few optional betas: thinking.display: "updates" for progress notes between tool calls, turn-scoped system messages, and content provenance.
The cache-read math#
Fable 5.1 keeps Fable 5's $10/$50 rates and cuts cache reads to $0.25 per million, which is 0.025x base input. On Opus 5.5 and Sonnet 5.5 cache reads are 0.05x, and 0.1x on other models (pricing). Claude Code sessions re-read a large cached prefix on every turn, so that rate matters most.
Here is an illustrative session from list prices: 30 turns, each re-reading a 200K-token cached prefix (6M cache-read tokens), with 2K output tokens per turn (60K total). Cache writes and fresh input are left out to isolate the change.
| Fable 5.1 | Fable 5 | Opus 5.5 | |
|---|---|---|---|
| 6M cache reads | $1.50 | $6.00 | $1.20 |
| 60K output | $3.00 | $3.00 | $1.20 |
| Total | $4.50 | $9.00 | $2.40 |
Two takeaways. On cached context, Fable 5.1 is now close to Opus 5.5 ($0.25 vs $0.20 per million). The 2.5x gap remains on fresh input and output, so a session that writes a lot of code still costs noticeably more on Fable. Anthropic's own estimate is that Fable 5.1 costs about 25% less than Fable 5 for typical workloads and up to about 45% less for highly agentic work, measured at default effort over four weeks of August 2026 usage. That is a vendor figure. Our example comes out at 50% because it is deliberately cache-heavy. For cache TTL break-even math, see Fable 5 prompt caching economics. Its numbers use the old $1 rate, so divide the cache-read side by four.
Fable 5.1 vs Opus 5.5: which to run#
Opus 5.5 is the closest alternative and the model you are probably already running, since it is the default on Pro, Max, Team, Enterprise, and the Anthropic API. Here they are side by side on documented specs:
| Fable 5.1 | Opus 5.5 | |
|---|---|---|
| Input / output per MTok | $10 / $50 | $4 / $20 |
| Cache read per MTok | $0.25 | $0.20 |
| Default effort | high | medium |
| Comparative latency (Anthropic) | Slower | Moderate |
| Context / max output | 1M / 128K | 1M / 128K |
| Thinking | Always on | Always on |
Forced tool_choice | 400 | 400 |
| Fast mode | No | Yes, Claude API only |
| Claude Code alias | fable | opus (and the default) |
| Claude Code safety fallback | Bio to Opus 5, cyber to Opus 4.8 | Bio to Opus 5, cyber to Opus 4.8 |
Anthropic's models overview recommends starting with Opus 5.5 for most workloads. It suggests Fable 5.1 for demanding reasoning and long-horizon agentic work, or when evals on Opus 5.5 at higher effort still fall short. Opus 5.5 is the better daily driver: cheaper per token, faster, and its medium default suits interactive steering. Fable 5.1's strength is the long, unattended run. The Claude Code docs describe the Fable models as suited to "tasks larger than a single sitting": they sustain long autonomous sessions, investigate before acting, and verify their work more often.
%% title: Picking Fable 5.1 or Opus 5.5 for a Claude Code task
flowchart TD
A["New task"] --> B{"Bigger than one sitting, or unclear root cause?"}
B -- No --> C["Opus 5.5 (default, medium effort)"]
B -- Yes --> D{"Opus 5.5 at high or xhigh fell short?"}
D -- No --> C
D -- Yes --> E["/model fable (Fable 5.1, high effort)"]
E --> F{"Routine follow-up step?"}
F -- Yes --> G["/effort low or medium, press s"]
F -- No --> H["Stay at high"]A practical pattern: try Opus 5.5 at high or xhigh first, and move to /model fable only when that falls short. More on the default model in the Opus 5.5 release guide.
Fable 5.1 vs Fable 5. On the Anthropic API there is little reason to stay on Fable 5: same per-token price, cheaper cache reads, and Anthropic reports better results. The real reasons to stay are operational. Your gateway may not serve 5.1 yet. Your own integration may still force tool_choice or edit history in ways 5.1 rejects. Or you may want to finish an eval baseline first. In those cases pin claude-fable-5 explicitly rather than relying on the alias.
Prompting Fable 5.1 in Claude Code#
The Claude Code docs give four rules for Fable:
- Describe the outcome, not the steps. Give it the result you want and let it plan the path. To keep it working toward that result, set a goal.
- Hand it ambiguous problems. Root-cause investigations, outage debugging, and architecture decisions are where its extra investigation and verification pay off.
- Skip the verification reminders. It checks its own work with less prompting, so "make sure to run the tests" lines are usually unnecessary.
- Size up larger tasks. Give it work you would normally break into pieces.
Three 5.1-specific shifts from the what's new page also show up in Claude Code transcripts. It writes fewer progress updates during long tool runs, especially at higher effort, so if you watch the transcript, ask for a short opening line and periodic updates. It sometimes makes one tool call per turn where Fable 5 batched several. And at low effort it answers from memory more often instead of checking, so raise effort for turns that need fresh information. If you want multi-agent orchestration on top, the Ultracode toggle in /effort works at any effort level on Fable 5.1.
FAQ#
Is Fable 5.1 the default model in Claude Code now?#
No. Opus 5.5, or your organization's default, is still the default model. Fable 5.1 is what the fable alias points to since v2.1.257, and you opt in with /model fable or claude --model fable.
Why does /model fable still give me Fable 5, or fail?#
There are four common causes. You are in a Claude apps gateway session (use /model claude-fable-5-1 if the gateway serves it). ANTHROPIC_DEFAULT_FABLE_MODEL pins Fable 5. Project, local, or managed settings hold claude-fable-5. Or you are below v2.1.257. From v2.1.301, if your organization can't use the newest Fable, the alias retries once on the previous one instead of erroring.
Does Fable 5.1 cost more than Opus 5.5 in Claude Code?#
Per token, yes: 2.5x on input and output ($10/$50 vs $4/$20). Cache reads are close ($0.25 vs $0.20 per million). On some plans Fable bills to usage credits, and -p runs and Agent SDK apps without a consent prompt bill them without asking.
Do I need to change my API code to move from claude-fable-5 to claude-fable-5-1?#
Yes, for most agent code. Change the model ID, remove tool_choice of type any or tool, keep the message history append-only so thinking blocks stay valid, and re-tune effort from high. Accounts created on or after August 31, 2026 get a 400 on edited history.
Can Claude Code switch me off Fable mid-session?#
Yes. Requests flagged as cybersecurity re-run on Opus 4.8, and biology-flagged ones re-run on Opus 5. The session stays on the fallback model until you run /model again.
Sources#
- Claude Code changelog, v2.1.257
- Claude Code changelog, v2.1.277
- Claude Code docs: Model configuration
- Claude Code docs: Environment variables
- Claude Fable 5.1 overview
- What's new in Claude Fable 5.1
- Claude models overview
- Claude API pricing
- Refusals and fallback
- Anthropic: Claude Fable 5.1 and Mythos 5.1
Continue Reading#
- Claude Opus 5.5 release guide - the cheaper default, and when it is enough
- Fable 5 effort levels explained - what each effort level costs across Fable and Opus
- Claude Fable 5 fallback in the API - handling refusals in your own API code
Get the next deep dive like this in your inbox
One email a week on Claude Code and the rest of the AI dev stack. Free.
Read next on Claude Code
How to Use Claude Fable 5: Every Access Path Explained
How to use Claude Fable 5 via claude.ai plans, the Claude API, Amazon Bedrock, Vertex AI and Microsoft Foundry, with model IDs, setup effort and prompt tips.
8 min readClaude Effort Levels Explained: Fable 5, Opus 5.5, Haiku 5.5
Claude effort levels explained: what low, medium, high, xhigh and max change on Fable 5, Opus 5.5 and Haiku 5.5, each default, and what a level costs.
14 min readClaude Opus 5.5 Developer Guide: Pricing, API, Claude Code
Claude Opus 5.5 costs $4/$20 per million tokens with $0.20 cache reads. SDK examples, Claude Code setup, and when to pick it over Sonnet 5.5 or Haiku 5.5.
11 min readTechnical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.








