Handling Fable 5 Refusals: A Working Guide to the Fallback API

The Fable 5 Moment
31 parts- 1Claude Mythos 5 Explained: What It Is, Who Can Access It, and Why It's Gated
- 2Migrating to Claude Fable 5: The Practical Guide
- 3Claude Fable 5 Access After the June 22 Deadline: Where Things Stand
- 4Claude Fable 5 vs GPT-5.6 Sol: Benchmarks, Pricing, and When Each Wins
- 5Fable 5 vs Opus 4.8: A Data-Driven Decision Guide for Engineering Teams
- 6How to Model Fable 5 Costs Before They Blow Up Your Budget
- 7Claude Fable 5 API: Production Integration Patterns, Rate Limits, and Migration Gotchas
- 8Handling Fable 5 Refusals: A Working Guide to the Fallback APICurrent
- 9Why Fable 5 Refuses Your Cybersecurity Queries (And How the Fallback Works)
- 10Fable 5's Hidden Guardrails: What Developers Need to Know About Silent Degradation
- 11Fable 5 Broke Enterprise ZDR Agreements: What Dev Teams Must Do Now
- 12Claude Managed Agents: Dreaming, Outcomes, and Multi-Agent Orchestration Explained
- 13Claude Managed Agents Public Beta: What's Actually Available vs What's Gated
- 14Dario Amodei Wants FAA-Style AI Regulation: Open Questions for Developers
- 15The Exponential and the Working Developer: Sitting With Amodei's Hardest Questions
- 16The Dario Paradox: Warning About the Exponential While Shipping It
- 17The Pushback on Amodei's Exponential Essay: Too Slow, Too Convenient, or About Right?
- 18Fable 5 Before June 22: The Decision Checklist for Every Plan Tier
- 19Fable 5 on AWS Bedrock: When Your Data Leaves the AWS Boundary
- 20Why Claude Desktop Installs a 1.8 GB Hyper-V VM on Windows
- 21Anthropic Model Names Explained: Fable, Mythos, Opus, Sonnet
- 22Managed Agents vs LangGraph vs Rolling Your Own: Who Should Run Your Agent Loop in 2026
- 23Claude Usage Limits With Fable 5: Windows and Burn Rates
- 24Fable 5 for Government and Regulated Teams: The GovCloud Question
- 25Fable 5 vs DeepSeek V4: The Cost-Quality Gap Measured in Real Tasks
- 26Fable 5 Orchestrator Playbook: Smart Model, Cheap Workers
- 27Prompt Caching Economics on Fable 5: When the 5-Minute TTL Pays
- 28Fable 5 with 1M Context: What Actually Works in Practice
- 29Claude Effort Levels Explained: Fable 5, Opus 5.5, Haiku 5.5
- 30Fable 5 Effort Levels vs Switching Models: When to Dial and When to Change
- 31Recursive Self-Improvement: What Fable 5, Dario's Essay, and Anthropic's Own Data Actually Tell Us
TL;DR
Handle Claude Fable 5 refusals with the fallback API: what a refusal looks like on the wire, three ways to handle it with code, and the billing rules.
Last updated: June 10, 2026
Claude Fable 5 is the same model as the restricted-access Mythos 5, wrapped in safety classifiers. When a classifier fires, Fable 5 doesn't answer. In the Claude apps, the request silently falls back to Opus 4.8. On the API, handling that is your job. If you have not yet moved your integration over, see Migrating to Claude Fable 5 and the June 22 deadline post for the cutover timeline.
This matters even if your product has nothing to do with security or biology. The classifiers are tuned conservative and they catch normal work: developers reported a base64 implementation flagged as cyber, genome-alignment pipelines rerouted, and prompts asking the model to "explain its reasoning" tripping the extraction filter. Anthropic's own number is that under 5% of sessions hit a fallback. Across production traffic, that's not an edge case. That's Tuesday.
Here's how refusals work on the wire, and the three ways to handle them.
What a refusal looks like#
A refusal is not an error. You get HTTP 200 with a new stop reason:
{
"id": "msg_...",
"model": "claude-fable-5",
"stop_reason": "refusal",
"stop_details": {
"type": "refusal",
"category": "cyber",
"explanation": "This request was flagged by safety classifiers..."
},
"content": [...],
"usage": {...}
}
Three things to know:
stop_details.categoryis"cyber","bio","reasoning_extraction", ornull.- A refusal can happen before any output or mid-stream. If it fires before output, you are not billed and it doesn't count against rate limits. Mid-stream, you pay for input plus whatever already streamed.
- If your code only checks for HTTP errors, refusals will surface as mysteriously short responses. Check
stop_reasonon every call.
Option 1: Manual retry on Opus 4.8#
The simplest approach. Catch the refusal, replay the conversation on claude-opus-4-8:
def create_with_fallback(client, **kwargs):
response = client.messages.create(model="claude-fable-5", **kwargs)
if response.stop_reason == "refusal":
# Strip thinking blocks before cross-model replay
clean_messages = strip_thinking_blocks(kwargs["messages"])
response = client.messages.create(
model="claude-opus-4-8",
**{**kwargs, "messages": clean_messages},
)
return response
The gotcha is in that strip_thinking_blocks call. Thinking blocks are model-specific: you pass them back unchanged on same-model multi-turn conversations, but you must strip thinking and redacted_thinking blocks when replaying history on a different model.
The bigger problem with manual retry is cost. Prompt caches are per-model. If you've built up a large cached prefix on Fable 5 and a refusal forces you to Opus 4.8, you pay full cache-write costs all over again on the new model. On a long agentic session with hundreds of thousands of cached tokens, that's real money. Anthropic shipped a fix for this, covered below.
Option 2: Server-side fallback (the good one)#
New with Fable 5, in beta. You declare fallback models in the request and Anthropic handles the reroute server-side:
response = client.messages.create(
model="claude-fable-5",
max_tokens=32000,
messages=messages,
fallbacks=[{"model": "claude-opus-4-8"}],
extra_headers={"anthropic-beta": "server-side-fallback-2026-06-01"},
)
Details that matter:
- The beta header must be exactly
server-side-fallback-2026-06-01. Other date values return a 400. - Up to 3 fallback models, tried in order. Each entry can override
max_tokensandthinkingfor that attempt only, which you'll want, because Opus 4.8 has different thinking semantics than Fable 5. - Only a safety-classifier decline triggers the fallback. Rate limits, overload, and 5xx errors do not. This is not a general resilience mechanism; pair it with your normal retry logic.
- Permitted fallback targets are published per-model as
allowed_fallback_modelson the Models API when you set the beta header.
The response tells you exactly what happened. The top-level model field reports whichever model actually answered, a new fallback content block marks the handoff:
{"type": "fallback", "from": {"model": "claude-fable-5"}, "to": {"model": "claude-opus-4-8"}}
and usage.iterations[] breaks out token usage per attempted model, which is what you want for cost attribution.
Availability caveat: server-side fallback works on the Claude API and Claude Platform on AWS only. It's rejected on the Batches API, and it doesn't exist on Bedrock, Vertex, or Microsoft Foundry. On those platforms you need option 3.
Option 3: SDK middleware#
Anthropic shipped refusal-fallback middleware for the TypeScript, Python, Go, Java, and C# SDKs alongside the launch. It implements the catch-refusal-retry-and-bill-correctly loop client-side:
import Anthropic from "@anthropic-ai/sdk";
import { refusalFallback } from "@anthropic-ai/sdk/middleware";
const client = new Anthropic({
middleware: [refusalFallback({ fallbackModel: "claude-opus-4-8" })],
});
This is the right answer on Bedrock and Vertex where server-side fallback isn't available, and for teams who want the behavior without taking a beta header into production. It also applies the fallback credit automatically, which brings us to billing.
The billing rules#
Scattered across three docs pages, collected here:
- Refusal before any output: free. No billing, no rate-limit hit.
- Mid-stream refusal: you pay for input plus already-streamed output at Fable 5 rates.
- The fallback answer is billed at the fallback model's rates. Anthropic states you won't be charged Fable prices for rerouted requests. Opus 4.8 answers cost Opus 4.8 prices ($5/$25 per MTok instead of $10/$50).
- Cache re-write costs are refundable via the fallback-credit beta.
That last one deserves explanation. When a refusal forces you onto a new model, the refusal response carries a one-time token in stop_details:
"stop_details": {
"type": "refusal",
"fallback_credit_token": "fct_...",
"fallback_has_prefill_claim": true
}
Echo it as a top-level fallback_credit_token on your retry (with the fallback-credit-2026-06-01 beta header, which the server-side-fallback header also grants), and the retry is billed as if the conversation had always been on the new model. No double-paying for cache writes.
You only need to touch this if you're hand-rolling retries in Ruby, PHP, or raw HTTP. Server-side fallback and the SDK middleware both apply it for you.
Which option to use#
- New project on the Claude API: server-side fallback. Least code, correct billing, per-model usage breakdown.
- Bedrock, Vertex, or Foundry: SDK middleware. Server-side fallback doesn't exist there.
- Batch workloads: manual handling. The Batches API rejects the
fallbacksparameter, so split refused items into a retry batch against Opus 4.8. - No SDK (raw HTTP): manual retry plus the fallback-credit token.
Reduce refusals before you handle them#
The cheapest refusal is the one that never fires. Two prompt-level fixes with outsized impact:
First, remove any instruction asking the model to reproduce its reasoning in responses. "Show your thought process" style prompts trigger the reasoning_extraction classifier. If you need process visibility, set thinking: {"display": "summarized"} and read the thinking blocks.
Second, if you work in security or life sciences legitimately, expect false positives and design for them rather than fighting them. The fallback path to Opus 4.8 is the supported answer. Opus 4.8 has no blocking cyber safeguards and remains a very capable model; for flagged requests, a clean fallback is a better experience than an argument with a classifier.
Log every refusal with its category. A week of data will tell you whether your workload has a 0.1% fallback rate or a 15% one, and that number should drive how much engineering you invest here.
FAQ#
Is a Fable 5 refusal billed the same as a normal request?#
No. A refusal that fires before any output is free and does not count against rate limits. A mid-stream refusal bills you for input plus whatever output already streamed at Fable 5 rates. The fallback answer itself is billed at the fallback model's rates, not Fable 5 rates.
Does server-side fallback work on Bedrock or Vertex?#
No. Server-side fallback is available only on the Claude API and Claude Platform on AWS. On Bedrock, Vertex, or Microsoft Foundry, use the SDK middleware instead, since it applies the same catch-refusal-retry-and-bill-correctly logic client-side.
Can I avoid refusals instead of just handling them?#
Partially. Two prompt-level changes reduce false positives: dropping instructions that ask the model to reproduce its reasoning in the response (which can trip the reasoning-extraction classifier), and expecting false positives if you legitimately work in security or life sciences, then designing the fallback path for them rather than fighting the classifier.
What should I use if I am hand-rolling retries in raw HTTP?#
Manual retry plus the fallback-credit token. Echo the fallback_credit_token from the refusal response back on your retry with the fallback-credit-2026-06-01 beta header so the retry is billed as if the conversation had always been on the fallback model, avoiding a double charge for cache writes.
Continue Reading#
- The Underground Relay Market for AI API Tokens: How Resellers Get 97% Off
- Claude Sonnet 5 Launch Analysis: The Most Agentic Sonnet Yet
- Claude Sonnet 5 vs Sonnet 4.6: Should You Upgrade?
- Claude Fable 5.1 in Claude Code: How to Switch, Pin, and Pay Less - what /model fable runs now and why cheaper cache reads matter for long sessions
- Claude Fable 5 - pricing, limits, and alternatives on one page
- Claude - the full model family, including the fallback tiers
Sources#
Get the next deep dive like this in your inbox
One email a week on Claude and the rest of the AI dev stack. Free.
Read next on Claude Code
Migrating to Claude Fable 5: The Practical Guide
Migrating to Claude Fable 5 from Opus 4.8 or older models - every breaking change, what to delete from your code, and the prompt audit to run before switching.
9 min readClaude Fable 5 Access After the June 22 Deadline: Where Things Stand
Claude Fable 5 access after the June 22 free window closed on Pro, Max, Team and Enterprise plans: what credits cost now and how to control Fable 5 spend.
6 min readWhy Fable 5 Refuses Your Cybersecurity Queries (And How the Fallback Works)
Why Claude Fable 5 refuses cybersecurity, bio and distillation queries, how it falls back to Opus 4.8, and what API developers must configure first.
8 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.








