Quick Answer
Claude Fable 5.1 is the default Fable model in current Claude Code, running at HIGH effort by default. You control it three ways: the /model selector (which gains a custom "fable" entry on first-party API access), the ANTHROPIC_DEFAULT_FABLE_MODEL environment variable (set it to claude-fable-5-1 to pin the model; it falls back to Fable 5 if unset), and ANTHROPIC_DEFAULT_MODEL for the session default (Claude Code v2.1.236+). For most developers on current versions, it's already on — the config below is for pinning versions, gateways, and automation.
Three Ways to Configure the Model
1. The /model selector
Inside a session, type /model and pick fable — the selector entry for Anthropic's flagship line. The "fable" entry appears when you're on first-party API access; Fable 5.1 runs at HIGH effort by default here, which is the recommended starting point per Anthropic's prompting guidance.
2. ANTHROPIC_DEFAULT_FABLE_MODEL (pin the Fable model ID)
This variable overrides which model the "fable" slot resolves to, and falls back to Fable 5 if unset — so pin it explicitly to get 5.1:
# ~/.zshrc or ~/.bashrc
export ANTHROPIC_DEFAULT_FABLE_MODEL=claude-fable-5-1
Or scoped to a project via .claude/settings.json:
{
"env": {
"ANTHROPIC_DEFAULT_FABLE_MODEL": "claude-fable-5-1"
}
}
3. ANTHROPIC_DEFAULT_MODEL (session default)
ANTHROPIC_DEFAULT_MODEL picks the model every session starts on (Claude Code v2.1.236+):
export ANTHROPIC_DEFAULT_MODEL=claude-fable-5-1
You can always switch mid-session with /model, whatever the default is. Verify what's live with /model or the status line — don't trust the banner alone.
Gateway Configuration
If you access Claude through a gateway instead of Anthropic directly, point Claude Code at it with two variables:
export ANTHROPIC_BASE_URL=https://api.teamorouter.com/anthropic
export ANTHROPIC_AUTH_TOKEN=tr-your-teamorouter-key
export ANTHROPIC_DEFAULT_FABLE_MODEL=claude-fable-5-1
With TeamoRouter this gets you pay-as-you-go billing (Alipay/WeChat, no international card) and — the practical win — you can switch models from the dashboard without touching Claude Code config: pin claude-fable-5-1 today, reroute to a cheaper model for routine tasks tomorrow, same local setup.
Why 5.1 Is the Best Claude Code Model Yet
Three reasons, all specific to how Claude Code works:
1. HIGH effort by default, on the model that earns it. Fable 5.1 scores 81.2% on SWE-bench Pro (#1) and 55.8% on Anthropic's long-task benchmark vs Fable 5's 42.0%. Claude Code sessions are exactly the long, multi-step tasks where that gap compounds — and CC defaults to High effort, the level Anthropic recommends starting from.
2. The $0.25 cache read fits Claude Code's access pattern perfectly. CC re-reads a big stable system prompt plus tool definitions at every step. That repeated prefix is exactly what cache-read pricing rewards: $0.25/M cached vs $1.00/M on Fable 5 — a 4x cut on the largest recurring line in a session. Combined with unchanged $10/$50 token rates, this is where Anthropic's ~25% typical / up to ~45% agentic savings come from. Long CC sessions on 5.1 are meaningfully cheaper than the same sessions on Fable 5. The cost math: Fable 5.1 pricing explained.
3. 128K max output. Whole-file refactors and large multi-file diffs fit in one response instead of being truncated into follow-up continuations — fewer "continue" round-trips, fewer half-applied patches.
Two Cautions Before You Switch Everything
From the Fable 5.1 migration guide, two changes bite automation built on Claude Code or the Agent SDK:
- Flows that force tool calls get 400s.
tool_choice{"type": "any"}or{"type": "tool"}— common in scripts and subagent wrappers around CC — is removed in 5.1. Switch to{"type": "auto"}and steer with prompts. - History-rewriting loops break. 5.1 restricts editing prior conversation turns mid-conversation, and its thinking blocks can't be passed to older models. Compaction/rewind-style flows that patch the transcript need to append corrective turns or fork from the last clean state instead.
Interactive Claude Code use is mostly unaffected — these hit programmatic wrappers, custom loops, and multi-model routing setups first.
When NOT to Switch
Fable 5.1 at HIGH effort is the most expensive way to answer a trivial question. Keep it for the hard 20% and route the rest:
- Routine tasks — renames, formatting, boilerplate tests, simple file edits — run fine on cheaper models, and at $50/M output tokens the effort you don't spend is money you keep.
- Set up routing, not just a default: through a gateway you can keep
claude-fable-5-1as the session default and point batch/CI jobs at a cheaper model. Claude Code pricing guide covers the plan-vs-API-vs-gateway math, and the limits guide covers how usage caps interact with a heavy flagship model. - Watch your weekly limits on subscription: Fable 5.1 consumes up to half your allocatable weekly limit on Max/premium seats. Heavy API-style volume usually belongs on pay-as-you-go.
For readers setting Claude Code up from scratch (or from regions without direct Anthropic billing), the gateway recommendation guide walks through access options end to end.
FAQ
What model ID do I use for Fable 5.1 in Claude Code?
claude-fable-5-1. Set ANTHROPIC_DEFAULT_FABLE_MODEL=claude-fable-5-1 to pin the "fable" selector to it; the variable falls back to Fable 5 if unset.
What is ANTHROPIC_DEFAULT_FABLE_MODEL vs ANTHROPIC_DEFAULT_MODEL?
ANTHROPIC_DEFAULT_FABLE_MODEL overrides which model the "fable" entry resolves to. ANTHROPIC_DEFAULT_MODEL (Claude Code v2.1.236+) sets the model every new session starts on. Set both if 5.1 should be your unconditional default; set the first if you just want /model's fable entry to be 5.1.
What effort level does Fable 5.1 use in Claude Code?
High, by default. You can change effort mid-conversation; Anthropic's guidance is to start at High and test other levels against your own tasks.
Do I need a new Claude Code version for Fable 5.1?
Use a current version — v2.1.236+ for ANTHROPIC_DEFAULT_MODEL support. /model switching and ANTHROPIC_DEFAULT_FABLE_MODEL work on earlier recent builds.
Can I use Fable 5.1 in Claude Code through a gateway?
Yes: ANTHROPIC_BASE_URL + ANTHROPIC_AUTH_TOKEN point CC at any compatible gateway. TeamoRouter gives pay-as-you-go access with Alipay/WeChat and dashboard-side model switching.
Is Fable 5.1 cheaper than Fable 5 in Claude Code?
For long sessions, yes — Claude Code's repeated-prefix pattern is the ideal case for the $0.25/M cache read (vs $1.00 on Fable 5), which is where most of the reported 25–45% savings come from.
Summary
For Claude Code, Fable 5.1 is close to a free upgrade: pin it with ANTHROPIC_DEFAULT_FABLE_MODEL=claude-fable-5-1 (or just /model → fable), keep the default HIGH effort, and let the $0.25 cache read cut your session costs — while fixing any forced-tool-call or history-rewriting automation before it hits the new 400s. Sign up for TeamoRouter to run it pay-as-you-go and switch models from the dashboard as your workload changes.
Get Started
TeamoRouter — one key, base_url https://api.teamorouter.com/anthropic, Fable 5.1 in Claude Code on Alipay/WeChat pay-as-you-go.