Repository Public
1---2title: Migrating to Claude Fable 5.1 and Claude Mythos 5.13url: https://platform.claude.com/docs/en/models/fable-5-1/migration-guide4description: "Migrate to Claude Fable 5.1 and Claude Mythos 5.1 from Claude Fable 5, Claude Mythos 5, Claude Opus 5, or Claude Opus 4.8: model IDs, breaking changes, and migration checklists."5---67<Note>8 This guide covers migrating [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) code. If you use [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview), no changes beyond updating the model name are required.9</Note>1011<Tip>12 **Automate your migration with the Claude API skill.** In Claude Code, run `/claude-api migrate` to invoke the bundled [Claude API skill](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/claude-api-skill#migrating-to-a-newer-claude-model). It works for any current Claude model as the target:1314 ```text wrap15 /claude-api migrate this project to claude-fable-5-116 ```1718 The skill applies the model ID swap and, as needed, breaking parameter changes, prefill replacement, and effort calibration for your target model across your code base, then produces a checklist of items to verify manually. It asks you to confirm the migration scope (entire working directory, a subdirectory, or a specific file list) before editing any files. The skill also detects Amazon Bedrock and Claude Platform on AWS clients and adjusts model ID formats and feature changes for those platforms.19</Tip>2021[Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1) succeeds Claude Fable 5 at the same input and output prices, with cache reads at a quarter of the cost. It's available on the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). [Claude Mythos 5.1](https://anthropic.com/glasswing) shares the same capabilities and is offered only to approved customers in Project Glasswing. For behavioral differences and prompting patterns, see [Prompting Claude Fable 5.1](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1).2223The baseline settings shared by `claude-fable-5-1` and `claude-mythos-5-1`:2425* **Thinking:** [Adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) is always on, unchanged from Claude Fable 5. The model decides when and how much to think. No `thinking` configuration is required. Both `thinking: {type: "disabled"}` and manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) return a 400 error.26* **Prefill:** Prefilling the assistant message returns a 400 error, unchanged from Claude Fable 5. Use system prompt instructions instead.27* **Tool choice:** `{type: "auto"}` (the default) and `{type: "none"}` are supported. Forcing a tool call with `{type: "any"}` or `{type: "tool", name: "..."}` returns a 400 error. See [Breaking changes](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-breaking-changes).28* **Preserved thinking across models:** Claude Fable 5.1 reads thinking blocks from Claude Opus 5, Claude Fable 5, Claude Mythos 5, and earlier Claude models. None of those models can read Claude Fable 5.1's blocks. See [Breaking changes](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-breaking-changes).29* **Context window and output:** A [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default, and up to 128k output tokens per request.30* **Pricing:** $10 USD per million input tokens and $50 USD per million output tokens, the same as Claude Fable 5. Prompt cache reads are $0.25 USD per million tokens, a quarter of the Claude Fable 5 rate. See [Claude pricing](https://platform.claude.com/docs/en/about-claude/pricing).31* **Data retention:** Both models require 30-day data retention, aren't available under zero data retention (ZDR) arrangements unless expressly authorized by Anthropic, and are designated Covered Models, the same as Claude Fable 5 and Claude Mythos 5. On the Claude API, a request from an organization or workspace without 30-day retention returns a 400 `invalid_request_error`. Organizations with a ZDR arrangement should contact their Anthropic account team, or configure retention per workspace. See [Model-specific data retention requirements](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements) for per-platform details.3233Where the two models diverge:3435* **Availability:** Claude Fable 5.1 doesn't require access approval. Claude Mythos 5.1 is available only to approved customers in [Project Glasswing](https://anthropic.com/glasswing). Contact your Anthropic account team for access.36* **Safety classifiers:** Claude Fable 5.1 runs safety classifiers covering the same `stop_details` categories as Claude Fable 5. A declined request returns `stop_reason: "refusal"` with a `stop_details.category`, and can fall back to another model with the `fallbacks` parameter or a client-side retry. See [Refusals and fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback).37* **Priority Tier:** Neither model is supported on [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models). Claude Fable 5 is.3839## Migrating to Claude Fable 5.1 from Claude Fable 54041Migration is mostly drop-in. The API surface, limits, per-token pricing, tokenizer, always-on adaptive thinking, refusal handling, and `stop_details` categories all match Claude Fable 5. What changes: forced tool choice returns a 400 error, thinking blocks are preserved only for the model that produced them or a newer one and only in the conversation that produced them, cache reads cost less, and agent-loop behavior differs in three ways. The same changes apply to [Claude Mythos 5.1](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#migrating-from-claude-mythos-5-to-claude-mythos-5-1), except the conversation check on thinking blocks, which Claude Mythos 5.1 doesn't run.4243### Update your model name4445```python46model = "claude-fable-5" # Before47model = "claude-fable-5-1" # After4849# Or, for the Project Glasswing model with the same capabilities:50model = "claude-mythos-5-1" # After51```5253### Breaking changes54551. **Forced tool choice is not supported:** Claude Fable 5 accepts `tool_choice` `auto`, `none`, `any`, and `tool`. On `claude-fable-5-1`, `{type: "any"}` and `{type: "tool", name: "..."}` return a 400 `invalid_request_error`:5657 ```text wrap58 tool_choice: type "tool" and "any" are not supported for this model.59 ```6061 The check applies on the Messages API, the Message Batches API, and the [token counting](https://platform.claude.com/docs/en/build-with-claude/token-counting) endpoint.6263 Before (Claude Fable 5):6465 <CodeGroup>66 ```bash cURL67 curl -sS https://api.anthropic.com/v1/messages \68 -H "content-type: application/json" \69 -H "x-api-key: $ANTHROPIC_API_KEY" \70 -H "anthropic-version: 2023-06-01" \71 -d @- <<'EOF'72 {73 "model": "claude-fable-5",74 "max_tokens": 16000,75 "tools": [76 {77 "name": "record_summary",78 "description": "Record the structured summary of the document.",79 "input_schema": {80 "type": "object",81 "properties": {"summary": {"type": "string"}},82 "required": ["summary"]83 }84 }85 ],86 "tool_choice": {"type": "tool", "name": "record_summary"},87 "messages": [88 {"role": "user", "content": "Summarize: The meeting moved to Thursday."}89 ]90 }91 EOF92 ```9394 <MultiFileExample language="cli" label="CLI">95 ```bash CLI96 ant messages create < request.yaml97 ```9899 <File filename="request.yaml">100 ```yaml101 model: claude-fable-5102 max_tokens: 16000103 tools:104 - name: record_summary105 description: Record the structured summary of the document.106 input_schema:107 type: object108 properties:109 summary:110 type: string111 required: [summary]112 tool_choice:113 type: tool114 name: record_summary115 messages:116 - role: user117 content: "Summarize: The meeting moved to Thursday."118 ```119 </File>120 </MultiFileExample>121122 ```python Python123 client = anthropic.Anthropic()124125 record_summary_tool = {126 "name": "record_summary",127 "description": "Record the structured summary of the document.",128 "input_schema": {129 "type": "object",130 "properties": {"summary": {"type": "string"}},131 "required": ["summary"],132 },133 }134135 response = client.messages.create(136 model="claude-fable-5",137 max_tokens=16000,138 tools=[record_summary_tool],139 tool_choice={"type": "tool", "name": "record_summary"},140 messages=[{"role": "user", "content": "Summarize: The meeting moved to Thursday."}],141 )142 print(response.content)143 ```144145 ```typescript TypeScript146 const client = new Anthropic();147148 const response = await client.messages.create({149 model: "claude-fable-5",150 max_tokens: 16000,151 tools: [152 {153 name: "record_summary",154 description: "Record the structured summary of the document.",155 input_schema: {156 type: "object",157 properties: { summary: { type: "string" } },158 required: ["summary"]159 }160 }161 ],162 tool_choice: { type: "tool", name: "record_summary" },163 messages: [{ role: "user", content: "Summarize: The meeting moved to Thursday." }]164 });165166 console.log(response.content);167 ```168169 ```csharp C#170 AnthropicClient client = new();171172 var parameters = new MessageCreateParams173 {174 Model = Model.ClaudeFable5,175 MaxTokens = 16000,176 Tools = [177 new ToolUnion(new Tool()178 {179 Name = "record_summary",180 Description = "Record the structured summary of the document.",181 InputSchema = new InputSchema()182 {183 Properties = new Dictionary<string, JsonElement>184 {185 ["summary"] = JsonSerializer.SerializeToElement(new { type = "string" }),186 },187 Required = ["summary"],188 },189 }),190 ],191 ToolChoice = new ToolChoiceTool { Name = "record_summary" },192 Messages = [193 new() { Role = Role.User, Content = "Summarize: The meeting moved to Thursday." }194 ]195 };196197 var message = await client.Messages.Create(parameters);198 Console.WriteLine(message);199 ```200201 ```go Go202 client := anthropic.NewClient()203204 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{205 Model: anthropic.ModelClaudeFable5,206 MaxTokens: 16000,207 Tools: []anthropic.ToolUnionParam{208 {OfTool: &anthropic.ToolParam{209 Name: "record_summary",210 Description: anthropic.String("Record the structured summary of the document."),211 InputSchema: anthropic.ToolInputSchemaParam{212 Properties: map[string]any{213 "summary": map[string]any{"type": "string"},214 },215 Required: []string{"summary"},216 },217 }},218 },219 ToolChoice: anthropic.ToolChoiceUnionParam{OfTool: &anthropic.ToolChoiceToolParam{Name: "record_summary"}},220 Messages: []anthropic.MessageParam{221 anthropic.NewUserMessage(anthropic.NewTextBlock("Summarize: The meeting moved to Thursday.")),222 },223 })224 if err != nil {225 log.Fatal(err)226 }227 fmt.Println(response.RawJSON())228 ```229230 ```java Java231232 void main() {233 AnthropicClient client = AnthropicOkHttpClient.fromEnv();234235 MessageCreateParams params = MessageCreateParams.builder()236 .model(Model.CLAUDE_FABLE_5)237 .maxTokens(16000L)238 .addTool(Tool.builder()239 .name("record_summary")240 .description("Record the structured summary of the document.")241 .inputSchema(InputSchema.builder()242 .properties(JsonValue.from(Map.of("summary", Map.of("type", "string"))))243 .required(List.of("summary"))244 .build())245 .build())246 .toolChoice(ToolChoice.ofTool(ToolChoiceTool.builder()247 .name("record_summary")248 .build()))249 .addUserMessage("Summarize: The meeting moved to Thursday.")250 .build();251252 Message response = client.messages().create(params);253 IO.println(response);254 }255 ```256257 ```php PHP258 $client = new Client();259260 $message = $client->messages->create(261 maxTokens: 16000,262 messages: [263 ['role' => 'user', 'content' => 'Summarize: The meeting moved to Thursday.']264 ],265 model: 'claude-fable-5',266 toolChoice: ['type' => 'tool', 'name' => 'record_summary'],267 tools: [268 [269 'name' => 'record_summary',270 'description' => 'Record the structured summary of the document.',271 'input_schema' => [272 'type' => 'object',273 'properties' => [274 'summary' => ['type' => 'string']275 ],276 'required' => ['summary']277 ]278 ]279 ],280 );281282 echo $message;283 ```284285 ```ruby Ruby286 client = Anthropic::Client.new287288 message = client.messages.create(289 model: Anthropic::Model::CLAUDE_FABLE_5,290 max_tokens: 16000,291 tools: [292 {293 name: "record_summary",294 description: "Record the structured summary of the document.",295 input_schema: {296 type: "object",297 properties: { summary: { type: "string" } },298 required: ["summary"]299 }300 }301 ],302 tool_choice: { type: "tool", name: "record_summary" },303 messages: [304 { role: "user", content: "Summarize: The meeting moved to Thursday." }305 ]306 )307 puts message308 ```309 </CodeGroup>310311 After (Claude Fable 5.1): leave `tool_choice` at `auto`, name the tool in the instruction, and set `strict: true` so the call matches your schema. (In a [CMEK](https://platform.claude.com/docs/en/manage-claude/cmek) organization, where [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs), including `strict: true`, are not available on Claude Fable models, rely on the instruction alone.) For example:312313 <CodeGroup>314 ```bash cURL315 curl -sS https://api.anthropic.com/v1/messages \316 -H "content-type: application/json" \317 -H "x-api-key: $ANTHROPIC_API_KEY" \318 -H "anthropic-version: 2023-06-01" \319 -d @- <<'EOF'320 {321 "model": "claude-fable-5-1",322 "max_tokens": 16000,323 "tools": [324 {325 "name": "record_summary",326 "description": "Record the structured summary of the document.",327 "strict": true,328 "input_schema": {329 "type": "object",330 "properties": {"summary": {"type": "string"}},331 "required": ["summary"],332 "additionalProperties": false333 }334 }335 ],336 "tool_choice": {"type": "auto"},337 "messages": [338 {"role": "user", "content": "Summarize: The meeting moved to Thursday. Call the record_summary tool with your result."}339 ]340 }341 EOF342 ```343344 <MultiFileExample language="cli" label="CLI">345 ```bash CLI346 ant messages create < request.yaml347 ```348349 <File filename="request.yaml">350 ```yaml351 model: claude-fable-5-1352 max_tokens: 16000353 tools:354 - name: record_summary355 description: Record the structured summary of the document.356 strict: true357 input_schema:358 type: object359 properties:360 summary:361 type: string362 required: [summary]363 additionalProperties: false364 tool_choice:365 type: auto366 messages:367 - role: user368 content: "Summarize: The meeting moved to Thursday. Call the record_summary tool with your result."369 ```370 </File>371 </MultiFileExample>372373 ```python Python374 client = anthropic.Anthropic()375376 record_summary_tool = {377 "name": "record_summary",378 "description": "Record the structured summary of the document.",379 "strict": True,380 "input_schema": {381 "type": "object",382 "properties": {"summary": {"type": "string"}},383 "required": ["summary"],384 "additionalProperties": False,385 },386 }387388 response = client.messages.create(389 model="claude-fable-5-1",390 max_tokens=16000,391 tools=[record_summary_tool],392 tool_choice={"type": "auto"},393 messages=[394 {395 "role": "user",396 "content": "Summarize: The meeting moved to Thursday. Call the record_summary tool with your result.",397 }398 ],399 )400 print(response.content)401 ```402403 ```typescript TypeScript404 const client = new Anthropic();405406 const response = await client.messages.create({407 model: "claude-fable-5-1",408 max_tokens: 16000,409 tools: [410 {411 name: "record_summary",412 description: "Record the structured summary of the document.",413 strict: true,414 input_schema: {415 type: "object",416 properties: { summary: { type: "string" } },417 required: ["summary"],418 additionalProperties: false419 }420 }421 ],422 tool_choice: { type: "auto" },423 messages: [424 {425 role: "user",426 content:427 "Summarize: The meeting moved to Thursday. Call the record_summary tool with your result."428 }429 ]430 });431432 console.log(response.content);433 ```434435 ```csharp C#436 AnthropicClient client = new();437438 var parameters = new MessageCreateParams439 {440 Model = "claude-fable-5-1",441 MaxTokens = 16000,442 Tools = [443 new ToolUnion(new Tool()444 {445 Name = "record_summary",446 Description = "Record the structured summary of the document.",447 Strict = true,448 InputSchema = new InputSchema(new Dictionary<string, JsonElement>449 {450 ["properties"] = JsonSerializer.SerializeToElement(new Dictionary<string, object>451 {452 ["summary"] = new { type = "string" },453 }),454 ["required"] = JsonSerializer.SerializeToElement(new[] { "summary" }),455 ["additionalProperties"] = JsonSerializer.SerializeToElement(false),456 }),457 }),458 ],459 ToolChoice = new ToolChoiceAuto(),460 Messages = [461 new() { Role = Role.User, Content = "Summarize: The meeting moved to Thursday. Call the record_summary tool with your result." }462 ]463 };464465 var message = await client.Messages.Create(parameters);466 Console.WriteLine(message);467 ```468469 ```go Go470 client := anthropic.NewClient()471472 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{473 Model: "claude-fable-5-1",474 MaxTokens: 16000,475 Tools: []anthropic.ToolUnionParam{476 {OfTool: &anthropic.ToolParam{477 Name: "record_summary",478 Description: anthropic.String("Record the structured summary of the document."),479 Strict: anthropic.Bool(true),480 InputSchema: anthropic.ToolInputSchemaParam{481 Properties: map[string]any{482 "summary": map[string]any{"type": "string"},483 },484 Required: []string{"summary"},485 ExtraFields: map[string]any{486 "additionalProperties": false,487 },488 },489 }},490 },491 ToolChoice: anthropic.ToolChoiceUnionParam{OfAuto: &anthropic.ToolChoiceAutoParam{}},492 Messages: []anthropic.MessageParam{493 anthropic.NewUserMessage(anthropic.NewTextBlock("Summarize: The meeting moved to Thursday. Call the record_summary tool with your result.")),494 },495 })496 if err != nil {497 log.Fatal(err)498 }499 fmt.Println(response.RawJSON())500 ```501502 ```java Java503504 void main() {505 AnthropicClient client = AnthropicOkHttpClient.fromEnv();506507 MessageCreateParams params = MessageCreateParams.builder()508 .model("claude-fable-5-1")509 .maxTokens(16000L)510 .addTool(Tool.builder()511 .name("record_summary")512 .description("Record the structured summary of the document.")513 .inputSchema(InputSchema.builder()514 .properties(JsonValue.from(Map.of("summary", Map.of("type", "string"))))515 .putAdditionalProperty("required", JsonValue.from(List.of("summary")))516 .putAdditionalProperty("additionalProperties", JsonValue.from(false))517 .build())518 .strict(true)519 .build())520 .toolChoice(ToolChoice.ofAuto(ToolChoiceAuto.builder().build()))521 .addUserMessage("Summarize: The meeting moved to Thursday. Call the record_summary tool with your result.")522 .build();523524 Message response = client.messages().create(params);525 IO.println(response);526 }527 ```528529 ```php PHP530 $client = new Client();531532 $message = $client->messages->create(533 maxTokens: 16000,534 messages: [535 ['role' => 'user', 'content' => 'Summarize: The meeting moved to Thursday. Call the record_summary tool with your result.']536 ],537 model: 'claude-fable-5-1',538 toolChoice: ['type' => 'auto'],539 tools: [540 [541 'name' => 'record_summary',542 'description' => 'Record the structured summary of the document.',543 'strict' => true,544 'input_schema' => [545 'type' => 'object',546 'properties' => [547 'summary' => ['type' => 'string']548 ],549 'required' => ['summary'],550 'additionalProperties' => false551 ]552 ]553 ],554 );555556 echo $message;557 ```558559 ```ruby Ruby560 client = Anthropic::Client.new561562 message = client.messages.create(563 model: "claude-fable-5-1",564 max_tokens: 16000,565 tools: [566 {567 name: "record_summary",568 description: "Record the structured summary of the document.",569 strict: true,570 input_schema: {571 type: "object",572 properties: { summary: { type: "string" } },573 required: ["summary"],574 additionalProperties: false575 }576 }577 ],578 tool_choice: { type: "auto" },579 messages: [580 { role: "user", content: "Summarize: The meeting moved to Thursday. Call the record_summary tool with your result." }581 ]582 )583 puts message584 ```585 </CodeGroup>586587 See [Strict tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use) and [Forcing tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools#forcing-tool-use). If you forced a tool only to get schema-conformant JSON, use [JSON outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs#json-outputs) (`output_config.format`) instead.588589 If your application, rather than the user, requires a specific tool call on the current turn of a multi-turn conversation, append a [mid-conversation system message](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages) after the latest `user` turn. Name the tool, say the call is required for this turn, and tell Claude to open its response with it. Because the message is appended rather than written into the top-level `system` prompt, earlier turns stay byte-identical and keep their [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) hits:590591 <CodeGroup>592 ```bash cURL593 curl -sS https://api.anthropic.com/v1/messages \594 -H "content-type: application/json" \595 -H "x-api-key: $ANTHROPIC_API_KEY" \596 -H "anthropic-version: 2023-06-01" \597 -d @- <<'EOF'598 {599 "model": "claude-fable-5-1",600 "max_tokens": 16000,601 "system": "You are a customer support assistant for an online electronics store.",602 "tools": [603 {604 "name": "search_help_center",605 "description": "Search the help center for policy and troubleshooting articles.",606 "strict": true,607 "input_schema": {608 "type": "object",609 "properties": {"query": {"type": "string"}},610 "required": ["query"],611 "additionalProperties": false612 }613 }614 ],615 "messages": [616 {"role": "user", "content": "My headphones from order A1234 arrived yesterday."},617 {"role": "assistant", "content": "Thanks for confirming. How can I help with order A1234?"},618 {"role": "user", "content": "I opened the box. Can I still return them?"},619 {620 "role": "system",621 "content": "Tool-use requirement for the current turn: the application requires a call to the search_help_center tool in your response to the user's latest message. Begin your response with the search_help_center tool call. Do not reply with text only."622 }623 ]624 }625 EOF626 ```627628 <MultiFileExample language="cli" label="CLI">629 ```bash CLI630 ant messages create < request.yaml631 ```632633 <File filename="request.yaml">634 ```yaml635 model: claude-fable-5-1636 max_tokens: 16000637 system: You are a customer support assistant for an online electronics store.638 tools:639 - name: search_help_center640 description: Search the help center for policy and troubleshooting articles.641 strict: true642 input_schema:643 type: object644 properties:645 query:646 type: string647 required: [query]648 additionalProperties: false649 messages:650 - role: user651 content: My headphones from order A1234 arrived yesterday.652 - role: assistant653 content: Thanks for confirming. How can I help with order A1234?654 - role: user655 content: I opened the box. Can I still return them?656 - role: system657 content: >-658 Tool-use requirement for the current turn: the application requires a call659 to the search_help_center tool in your response to the user's latest message.660 Begin your response with the search_help_center tool call. Do not reply with661 text only.662 ```663 </File>664 </MultiFileExample>665666 ```python Python667 client = anthropic.Anthropic()668669 search_help_center_tool = {670 "name": "search_help_center",671 "description": "Search the help center for policy and troubleshooting articles.",672 "strict": True,673 "input_schema": {674 "type": "object",675 "properties": {"query": {"type": "string"}},676 "required": ["query"],677 "additionalProperties": False,678 },679 }680681 response = client.messages.create(682 model="claude-fable-5-1",683 max_tokens=16000,684 system="You are a customer support assistant for an online electronics store.",685 tools=[search_help_center_tool],686 messages=[687 {688 "role": "user",689 "content": "My headphones from order A1234 arrived yesterday.",690 },691 {692 "role": "assistant",693 "content": "Thanks for confirming. How can I help with order A1234?",694 },695 {"role": "user", "content": "I opened the box. Can I still return them?"},696 # The application requires a help center lookup before any policy697 # answer. Appending the requirement as a system message leaves the698 # earlier turns unchanged.699 {700 "role": "system",701 "content": "Tool-use requirement for the current turn: the application requires a call to the search_help_center tool in your response to the user's latest message. Begin your response with the search_help_center tool call. Do not reply with text only.",702 },703 ],704 )705 print(response.content)706 ```707708 ```typescript TypeScript709 const client = new Anthropic();710711 const response = await client.messages.create({712 model: "claude-fable-5-1",713 max_tokens: 16000,714 system: "You are a customer support assistant for an online electronics store.",715 tools: [716 {717 name: "search_help_center",718 description: "Search the help center for policy and troubleshooting articles.",719 strict: true,720 input_schema: {721 type: "object",722 properties: { query: { type: "string" } },723 required: ["query"],724 additionalProperties: false725 }726 }727 ],728 messages: [729 { role: "user", content: "My headphones from order A1234 arrived yesterday." },730 { role: "assistant", content: "Thanks for confirming. How can I help with order A1234?" },731 { role: "user", content: "I opened the box. Can I still return them?" },732 // The application requires a help center lookup before any policy733 // answer. Appending the requirement as a system message leaves the734 // earlier turns unchanged.735 {736 role: "system",737 content:738 "Tool-use requirement for the current turn: the application requires a call to the search_help_center tool in your response to the user's latest message. Begin your response with the search_help_center tool call. Do not reply with text only."739 }740 ]741 });742743 console.log(response.content);744 ```745746 ```csharp C#747 AnthropicClient client = new();748749 var parameters = new MessageCreateParams750 {751 Model = "claude-fable-5-1",752 MaxTokens = 16000,753 System = "You are a customer support assistant for an online electronics store.",754 Tools = [755 new ToolUnion(new Tool()756 {757 Name = "search_help_center",758 Description = "Search the help center for policy and troubleshooting articles.",759 Strict = true,760 InputSchema = new InputSchema(new Dictionary<string, JsonElement>761 {762 ["properties"] = JsonSerializer.SerializeToElement(new Dictionary<string, object>763 {764 ["query"] = new { type = "string" },765 }),766 ["required"] = JsonSerializer.SerializeToElement(new[] { "query" }),767 ["additionalProperties"] = JsonSerializer.SerializeToElement(false),768 }),769 }),770 ],771 Messages = [772 new() { Role = Role.User, Content = "My headphones from order A1234 arrived yesterday." },773 new() { Role = Role.Assistant, Content = "Thanks for confirming. How can I help with order A1234?" },774 new() { Role = Role.User, Content = "I opened the box. Can I still return them?" },775 // The application requires a help center lookup before any policy776 // answer. Appending the requirement as a system message leaves the777 // earlier turns unchanged.778 new()779 {780 Role = Role.System,781 Content = "Tool-use requirement for the current turn: the application requires a call to the search_help_center tool in your response to the user's latest message. Begin your response with the search_help_center tool call. Do not reply with text only."782 }783 ]784 };785786 var message = await client.Messages.Create(parameters);787 Console.WriteLine(message);788 ```789790 ```go Go791 client := anthropic.NewClient()792793 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{794 Model: "claude-fable-5-1",795 MaxTokens: 16000,796 System: []anthropic.TextBlockParam{797 {Text: "You are a customer support assistant for an online electronics store."},798 },799 Tools: []anthropic.ToolUnionParam{800 {OfTool: &anthropic.ToolParam{801 Name: "search_help_center",802 Description: anthropic.String("Search the help center for policy and troubleshooting articles."),803 Strict: anthropic.Bool(true),804 InputSchema: anthropic.ToolInputSchemaParam{805 Properties: map[string]any{806 "query": map[string]any{"type": "string"},807 },808 Required: []string{"query"},809 ExtraFields: map[string]any{810 "additionalProperties": false,811 },812 },813 }},814 },815 Messages: []anthropic.MessageParam{816 anthropic.NewUserMessage(anthropic.NewTextBlock("My headphones from order A1234 arrived yesterday.")),817 anthropic.NewAssistantMessage(anthropic.NewTextBlock("Thanks for confirming. How can I help with order A1234?")),818 anthropic.NewUserMessage(anthropic.NewTextBlock("I opened the box. Can I still return them?")),819 // The application requires a help center lookup before any policy820 // answer. Appending the requirement as a system message leaves the821 // earlier turns unchanged.822 {823 Role: anthropic.MessageParamRoleSystem,824 Content: []anthropic.ContentBlockParamUnion{825 anthropic.NewTextBlock("Tool-use requirement for the current turn: the application requires a call to the search_help_center tool in your response to the user's latest message. Begin your response with the search_help_center tool call. Do not reply with text only."),826 },827 },828 },829 })830 if err != nil {831 log.Fatal(err)832 }833 fmt.Println(response.RawJSON())834 ```835836 ```java Java837838 void main() {839 AnthropicClient client = AnthropicOkHttpClient.fromEnv();840841 MessageCreateParams params = MessageCreateParams.builder()842 .model("claude-fable-5-1")843 .maxTokens(16000L)844 .system("You are a customer support assistant for an online electronics store.")845 .addTool(Tool.builder()846 .name("search_help_center")847 .description("Search the help center for policy and troubleshooting articles.")848 .inputSchema(InputSchema.builder()849 .properties(JsonValue.from(Map.of("query", Map.of("type", "string"))))850 .putAdditionalProperty("required", JsonValue.from(List.of("query")))851 .putAdditionalProperty("additionalProperties", JsonValue.from(false))852 .build())853 .strict(true)854 .build())855 .addUserMessage("My headphones from order A1234 arrived yesterday.")856 .addAssistantMessage("Thanks for confirming. How can I help with order A1234?")857 .addUserMessage("I opened the box. Can I still return them?")858 // The application requires a help center lookup before any policy859 // answer. Appending the requirement as a system message leaves the860 // earlier turns unchanged.861 .addMessage(MessageParam.builder()862 .role(MessageParam.Role.SYSTEM)863 .content("Tool-use requirement for the current turn: the application requires a call to the search_help_center tool in your response to the user's latest message. Begin your response with the search_help_center tool call. Do not reply with text only.")864 .build())865 .build();866867 Message response = client.messages().create(params);868 IO.println(response);869 }870 ```871872 ```php PHP873 $client = new Client();874875 $message = $client->messages->create(876 maxTokens: 16000,877 messages: [878 ['role' => 'user', 'content' => 'My headphones from order A1234 arrived yesterday.'],879 ['role' => 'assistant', 'content' => 'Thanks for confirming. How can I help with order A1234?'],880 ['role' => 'user', 'content' => 'I opened the box. Can I still return them?'],881 // The application requires a help center lookup before any policy882 // answer. Appending the requirement as a system message leaves the883 // earlier turns unchanged.884 ['role' => 'system', 'content' => 'Tool-use requirement for the current turn: the application requires a call to the search_help_center tool in your response to the user\'s latest message. Begin your response with the search_help_center tool call. Do not reply with text only.']885 ],886 model: 'claude-fable-5-1',887 system: 'You are a customer support assistant for an online electronics store.',888 tools: [889 [890 'name' => 'search_help_center',891 'description' => 'Search the help center for policy and troubleshooting articles.',892 'strict' => true,893 'input_schema' => [894 'type' => 'object',895 'properties' => [896 'query' => ['type' => 'string']897 ],898 'required' => ['query'],899 'additionalProperties' => false900 ]901 ]902 ],903 );904905 echo $message;906 ```907908 ```ruby Ruby909 client = Anthropic::Client.new910911 message = client.messages.create(912 model: "claude-fable-5-1",913 max_tokens: 16000,914 system: "You are a customer support assistant for an online electronics store.",915 tools: [916 {917 name: "search_help_center",918 description: "Search the help center for policy and troubleshooting articles.",919 strict: true,920 input_schema: {921 type: "object",922 properties: { query: { type: "string" } },923 required: ["query"],924 additionalProperties: false925 }926 }927 ],928 messages: [929 { role: "user", content: "My headphones from order A1234 arrived yesterday." },930 { role: "assistant", content: "Thanks for confirming. How can I help with order A1234?" },931 { role: "user", content: "I opened the box. Can I still return them?" },932 # The application requires a help center lookup before any policy933 # answer. Appending the requirement as a system message leaves the934 # earlier turns unchanged.935 {936 role: "system",937 content: "Tool-use requirement for the current turn: the application requires a call to the search_help_center tool in your response to the user's latest message. Begin your response with the search_help_center tool call. Do not reply with text only."938 }939 ]940 )941 puts message942 ```943 </CodeGroup>944945 Keep the `role: "system"` message in the history on later requests, as with any other turn. Mid-conversation system messages need no beta header. `tool_choice: {"type": "none"}` still works for a turn that must not call tools.9469472. **Thinking blocks are preserved only for the model that produced them, or a newer one:** Every `thinking` block records which model produced it. Claude Fable 5.1 reads its own blocks and those from Claude Mythos 5.1, Claude Opus 5, Claude Fable 5, Claude Mythos 5, and earlier Claude models. A conversation moving onto `claude-fable-5-1` from any of those keeps its earlier reasoning. The condition is one-way: apart from Claude Mythos 5.1, none of those models can read Claude Fable 5.1's blocks.948949 A conversation that ran on Claude Fable 5.1 can land on an older model through a router switch, a client-side retry, or a [classifier refusal fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback), including a [server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback). The API removes the blocks that model can't read before it sees them, the request succeeds, and you aren't billed for the dropped input tokens. The target model re-plans without that reasoning, which can raise cost and latency on the first turn after the switch. To see what was dropped, send the `thinking-binding-controls-2026-08-01` [beta header](https://platform.claude.com/docs/en/api/beta-headers): responses then carry an `input_transformations` array naming each dropped block with `reason: "model_binding_mismatch"`. See [Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-models).9509513. **Editing earlier turns invalidates thinking blocks:** Each `thinking` block from Claude Fable 5.1 is valid only against the `system` prompt, `tools`, and conversation history that preceded it. If Claude Code, claude.ai, [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview), or the [Claude Agent SDK](https://code.claude.com/docs/en/agent-sdk/overview) manages your conversation history, it already keeps that prefix intact. If your code builds the `messages` array itself, this item applies to you, and [Preserved thinking](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking) is the full integration guide. Where the check is enforced, a request that sends the block back after any of those changed is rejected with a 400 error:952953 ```text wrap954 messages.5.content.0: Invalid `signature` in `thinking` block. The block is bound to a different conversation. Remove the block, or set `thinking.block_binding.prefix_mismatch_behavior` to "drop_block". That setting requires the `thinking-binding-controls-2026-08-01` value in the `anthropic-beta` header.955 ```956957 The API enforces the check for new accounts created on or after August 31, 2026. For accounts created earlier, the API records the mismatch but doesn't act on it unless the request sets `thinking.block_binding.prefix_mismatch_behavior`, which opts into enforcement. Anthropic plans to enforce the check for every account on future models, so make your application compatible now: the same patterns keep the prompt cache warm, and you can test against the check from any account by sending `prefix_mismatch_behavior`. If you ship a tool or framework that people run with their own API key, test that way before launch: your key is probably on an older account, and your users on new ones hit the check before you do. To see whether your own account is enforced by default, send a request that edits history without the beta header: a 400 that names the header means it is.958959 The error is permanent for that request body: an automatic retry loop won't clear it. To continue without the invalidated reasoning instead of failing, strip the `thinking` blocks from the history and retry once, or send the `thinking-binding-controls-2026-08-01` [beta header](https://platform.claude.com/docs/en/api/beta-headers) and set `prefix_mismatch_behavior` to `"drop_block"` (the default is `"error"`). With `"drop_block"`, the API drops the mismatched block and every thinking block after it in the conversation, and reports each with `reason: "prefix_binding_mismatch"` in the response's `input_transformations` array:960961 <CodeGroup>962 ```bash cURL963 curl https://api.anthropic.com/v1/messages \964 -H "x-api-key: $ANTHROPIC_API_KEY" \965 -H "anthropic-version: 2023-06-01" \966 -H "anthropic-beta: thinking-binding-controls-2026-08-01" \967 -H "content-type: application/json" \968 -d '{969 "model": "claude-fable-5-1",970 "max_tokens": 16000,971 "thinking": {972 "type": "adaptive",973 "block_binding": {974 "prefix_mismatch_behavior": "drop_block"975 }976 },977 "messages": [978 {979 "role": "user",980 "content": "What is the greatest common divisor of 1071 and 462?"981 }982 ]983 }'984 ```985986 <MultiFileExample language="cli" label="CLI">987 ```bash CLI988 ant beta:messages create \989 --beta thinking-binding-controls-2026-08-01 \990 --transform '{content.#(type=="text")#.text,input_transformations}' \991 --format yaml < request.yaml992 ```993994 <File filename="request.yaml">995 ```yaml996 model: claude-fable-5-1997 max_tokens: 16000998 thinking:999 type: adaptive1000 block_binding:1001 prefix_mismatch_behavior: drop_block1002 messages:1003 - role: user1004 content: What is the greatest common divisor of 1071 and 462?1005 ```1006 </File>1007 </MultiFileExample>10081009 ```python Python1010 client = anthropic.Anthropic()10111012 response = client.beta.messages.create(1013 model="claude-fable-5-1",1014 max_tokens=16000,1015 thinking={1016 "type": "adaptive",1017 "block_binding": {"prefix_mismatch_behavior": "drop_block"},1018 },1019 messages=[1020 {1021 "role": "user",1022 "content": "What is the greatest common divisor of 1071 and 462?",1023 }1024 ],1025 betas=["thinking-binding-controls-2026-08-01"],1026 )10271028 for block in response.content:1029 if block.type == "text":1030 print(block.text)10311032 print(f"Input transformations: {len(response.input_transformations or [])}")1033 ```10341035 ```typescript TypeScript1036 const client = new Anthropic();10371038 const response = await client.beta.messages.create({1039 model: "claude-fable-5-1",1040 max_tokens: 16000,1041 thinking: {1042 type: "adaptive",1043 block_binding: { prefix_mismatch_behavior: "drop_block" }1044 },1045 messages: [1046 { role: "user", content: "What is the greatest common divisor of 1071 and 462?" }1047 ],1048 betas: ["thinking-binding-controls-2026-08-01"]1049 });10501051 for (const block of response.content) {1052 if (block.type === "text") {1053 console.log(block.text);1054 }1055 }1056 console.log(`Input transformations: ${response.input_transformations?.length ?? 0}`);1057 ```10581059 ```csharp C#1060 using Anthropic.Models.Beta;1061 using Anthropic.Models.Beta.Messages;10621063 AnthropicClient client = new();10641065 var response = await client.Beta.Messages.Create(1066 new()1067 {1068 Model = "claude-fable-5-1",1069 MaxTokens = 16000,1070 Thinking = new BetaThinkingConfigAdaptive1071 {1072 BlockBinding = new()1073 {1074 PrefixMismatchBehavior = BetaThinkingPrefixMismatchBehavior.DropBlock,1075 },1076 },1077 Messages =1078 [1079 new()1080 {1081 Role = Role.User,1082 Content = "What is the greatest common divisor of 1071 and 462?",1083 },1084 ],1085 Betas = [AnthropicBeta.ThinkingBindingControls2026_08_01],1086 }1087 );10881089 foreach (var block in response.Content)1090 {1091 if (block.TryPickText(out var textBlock))1092 {1093 Console.WriteLine(textBlock.Text);1094 }1095 }10961097 Console.WriteLine($"Input transformations: {response.InputTransformations?.Count ?? 0}");1098 ```10991100 ```go Go1101 client := anthropic.NewClient()11021103 response, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{1104 Model: "claude-fable-5-1",1105 MaxTokens: 16000,1106 Thinking: anthropic.BetaThinkingConfigParamUnion{1107 OfAdaptive: &anthropic.BetaThinkingConfigAdaptiveParam{1108 BlockBinding: anthropic.BetaThinkingBlockBindingParam{1109 PrefixMismatchBehavior: anthropic.BetaThinkingPrefixMismatchBehaviorDropBlock,1110 },1111 },1112 },1113 Messages: []anthropic.BetaMessageParam{1114 anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("What is the greatest common divisor of 1071 and 462?")),1115 },1116 Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaThinkingBindingControls2026_08_01},1117 })1118 if err != nil {1119 log.Fatal(err)1120 }11211122 for _, block := range response.Content {1123 if textBlock, ok := block.AsAny().(anthropic.BetaTextBlock); ok {1124 fmt.Println(textBlock.Text)1125 }1126 }1127 fmt.Printf("Input transformations: %d\n", len(response.InputTransformations))1128 ```11291130 ```java Java1131 import com.anthropic.models.beta.AnthropicBeta;1132 import com.anthropic.models.beta.messages.BetaMessage;1133 import com.anthropic.models.beta.messages.BetaThinkingBlockBinding;1134 import com.anthropic.models.beta.messages.BetaThinkingConfigAdaptive;1135 import com.anthropic.models.beta.messages.BetaThinkingPrefixMismatchBehavior;1136 import com.anthropic.models.beta.messages.MessageCreateParams;11371138 void main() {1139 AnthropicClient client = AnthropicOkHttpClient.fromEnv();11401141 MessageCreateParams params = MessageCreateParams.builder()1142 .model("claude-fable-5-1")1143 .maxTokens(16000L)1144 .addBeta(AnthropicBeta.THINKING_BINDING_CONTROLS_2026_08_01)1145 .thinking(BetaThinkingConfigAdaptive.builder()1146 .blockBinding(BetaThinkingBlockBinding.builder()1147 .prefixMismatchBehavior(BetaThinkingPrefixMismatchBehavior.DROP_BLOCK)1148 .build())1149 .build())1150 .addUserMessage("What is the greatest common divisor of 1071 and 462?")1151 .build();11521153 BetaMessage response = client.beta().messages().create(params);11541155 response.content().stream()1156 .flatMap(block -> block.text().stream())1157 .forEach(textBlock -> IO.println(textBlock.text()));1158 IO.println("Input transformations: "1159 + response.inputTransformations().map(List::size).orElse(0));1160 }1161 ```11621163 ```php PHP1164 use Anthropic\Beta\AnthropicBeta;1165 use Anthropic\Beta\Messages\BetaThinkingBlockBinding;1166 use Anthropic\Beta\Messages\BetaThinkingConfigAdaptive;1167 use Anthropic\Beta\Messages\BetaThinkingPrefixMismatchBehavior;1168 use Anthropic\Client;11691170 $client = new Client();11711172 $response = $client->beta->messages->create(1173 model: 'claude-fable-5-1',1174 maxTokens: 16000,1175 thinking: BetaThinkingConfigAdaptive::with(1176 blockBinding: BetaThinkingBlockBinding::with(1177 prefixMismatchBehavior: BetaThinkingPrefixMismatchBehavior::DROP_BLOCK,1178 ),1179 ),1180 messages: [1181 ['role' => 'user', 'content' => 'What is the greatest common divisor of 1071 and 462?'],1182 ],1183 betas: [AnthropicBeta::THINKING_BINDING_CONTROLS_2026_08_01],1184 );11851186 foreach ($response->content as $block) {1187 if ($block->type === 'text') {1188 echo $block->text, PHP_EOL;1189 }1190 }11911192 echo 'Input transformations: ', count($response->inputTransformations ?? []), PHP_EOL;1193 ```11941195 ```ruby Ruby1196 client = Anthropic::Client.new11971198 response = client.beta.messages.create(1199 model: "claude-fable-5-1",1200 max_tokens: 16_000,1201 thinking: {1202 type: "adaptive",1203 block_binding: {prefix_mismatch_behavior: "drop_block"}1204 },1205 messages: [1206 {role: "user", content: "What is the greatest common divisor of 1071 and 462?"}1207 ],1208 betas: [Anthropic::AnthropicBeta::THINKING_BINDING_CONTROLS_2026_08_01]1209 )12101211 response.content.each do |block|1212 puts block.text if block.type == :text1213 end12141215 puts "Input transformations: #{response.input_transformations&.length || 0}"1216 ```1217 </CodeGroup>12181219 The [token counting](https://platform.claude.com/docs/en/build-with-claude/token-counting) endpoint runs the same check. See [Controls for blocks that aren't preserved (beta)](https://platform.claude.com/docs/en/build-with-claude/thinking#preserved-thinking-controls) for the response shape and streaming placement.12201221 Patterns that invalidate later thinking blocks, and what to do instead:12221223 * Editing, reordering, or removing earlier turns. This includes deleting old tool results, snipping turns out of the middle of the transcript, and client-side compaction that keeps recent turns and their thinking blocks verbatim behind a summary (including background compaction that swaps its summary in a few turns later). Instead, use server-side [compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) or [context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing) ([tool result clearing](https://platform.claude.com/docs/en/build-with-claude/context-editing#tool-result-clearing) for old tool results), or one of the client-side compaction shapes in [Trim context on the server](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-trim-context).1224 * Injecting content you don't persist, for example a per-turn reminder appended after the `tool_result` blocks and removed on the next request. Instead, send the reminder as a [turn-scoped system message](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#turn-scoped-system-messages) and leave it in the history.1225 * Rebuilding the top-level `system` prompt or the `tools` array between requests in the same conversation, for example to update the current date or to add or remove a tool. Instead, append a [mid-conversation system message](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages) that carries the new instruction ("The current date is 2026-09-14.") or `tool_addition` and `tool_removal` blocks.1226 * An image or document URL that serves different bytes on a later request. The check covers the bytes, not the URL string, so a rotating signed URL for the same file is fine. For content you reference across turns, upload it once with the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) and send the `file_id`, or send base64.12271228 Each replacement also keeps earlier turns byte-identical and preserves the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) hits that editing the history, `system` prompt, or `tools` array would lose.12291230 Patterns that keep working:12311232 * Append-only histories: adding turns and passing earlier turns back exactly as sent and received, including appended `role: "system"` messages.1233 * Removing thinking blocks from earlier assistant turns, oldest first.1234 * Changing `effort`, `max_tokens`, or any other request parameter outside `system`, `tools`, and `messages`, and adding or moving `cache_control` markers.1235 * Server-side compaction and context editing, including [thinking block clearing](https://platform.claude.com/docs/en/build-with-claude/context-editing#thinking-block-clearing). They don't count as edits, because the check compares the conversation as you sent it.12361237 To check an existing integration:12381239 1. Capture the exact request bodies it sends over a few normal turns, including a compaction or a tool change if your product has them. For each pair of consecutive requests, compare the `system` prompt, the `tools` array, and the shared prefix of `messages`. They should be byte-identical up to the newly appended turns. An expected exception is a request that swaps in a signed `compaction` block from [on-demand compaction](https://platform.claude.com/docs/en/build-with-claude/compaction#compact-on-demand-with-the-compaction-parameter): the block replaces the messages it summarizes at the front of `messages`, and everything after it should still match.1240 2. Run a normal multi-turn session against `claude-fable-5-1` with the `thinking-binding-controls-2026-08-01` beta header and `prefix_mismatch_behavior: "drop_block"`, and log `input_transformations` on every response. An empty array on every turn means the history is intact. An entry with `reason: "prefix_binding_mismatch"` means something before the block at `path` changed since the previous request. An entry with `reason: "model_binding_mismatch"` means the conversation switched models, which isn't a bug in your code. This works from any account, because setting the field opts the request into enforcement. In CI, set `"error"` instead so an edit fails the run.1241 3. Choose a production setting. Leave the default `"error"` if a prefix mismatch can only mean a bug in your code, or set `"drop_block"` to drop the affected blocks instead of failing, and monitor the 400s or the `input_transformations` entries either way.12421243 Dropping thinking blocks once, at a compaction boundary for example, has little effect. An integration that invalidates prior thinking on every request restarts the prompt cache each time, which can raise cost per task (see [Keep the conversation history append-only](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#keep-the-conversation-history-append-only)).12441245### Behavior changes124612471. **Fewer parallel tool calls in long agent loops:** In long-running loops where the next independent reads are only implied by the task (custom coding agents, bash-and-editor harnesses, computer use), Claude Fable 5.1 may issue one tool call per turn. Each extra turn costs tokens, a round trip, and wall-clock time. Append a one-sentence batching instruction after each user message as a [turn-scoped system message](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#turn-scoped-system-messages) (`clear_at: "next_user_message"`, beta), or, without the beta, in a text block after the `tool_result` blocks, and leave the earlier copies in the history on later requests. See [Batch independent tool calls in agent loops](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#batch-independent-tool-calls-in-agent-loops).124812492. **Fewer progress messages between tool calls:** Claude Fable 5.1 writes fewer status updates during long tool sequences than Claude Fable 5, and its agentic coding summaries are shorter. If your interface renders those updates, set `thinking.display` to `"updates"` (beta) or `"summarized"` and prompt for them explicitly. See [Progress updates between tool calls](https://platform.claude.com/docs/en/build-with-claude/thinking#progress-updates) and [Ask for user-facing progress updates](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#ask-for-user-facing-progress-updates).125012513. **Fewer search and retrieval calls at low effort:** At `low` effort Claude Fable 5.1 answers from memory more often than Claude Fable 5 instead of calling a search or retrieval tool. If your product relies on retrieval at low effort, raise effort for those requests or tell the model when to search. See [Search triggering at low effort](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#search-triggering-at-low-effort).12521253For the differences in prose density, chat formatting, quoting in summaries, and file edits, which don't affect API integration, see [Changed from Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5-1/whats-new-fable-5-1#changed-from-claude-fable-5).12541255### Recommended changes12561257These changes aren't required, but each one lowers cost or latency or removes a failure mode:125812591. **Change effort mid-conversation (beta):** On Claude Fable 5, `output_config.effort` is request-level, and changing it between requests drops cached prefixes from earlier turns. On `claude-fable-5-1`, a `role: "system"` message carrying only `output_config` raises effort for a hard step or lowers it for routine ones without invalidating the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching):12601261 <CodeGroup>1262 ```bash cURL1263 # Effort-only system message: the new level takes effect from the next user turn.1264 curl https://api.anthropic.com/v1/messages \1265 -H "x-api-key: $ANTHROPIC_API_KEY" \1266 -H "anthropic-version: 2023-06-01" \1267 -H "anthropic-beta: mid-conversation-output-config-2026-07-01" \1268 -H "content-type: application/json" \1269 -d '{1270 "model": "claude-fable-5-1",1271 "max_tokens": 4096,1272 "output_config": {"effort": "high"},1273 "messages": [1274 {"role": "user", "content": "Plan a migration from SQLite to PostgreSQL in three short steps."},1275 {"role": "assistant", "content": "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."},1276 {"role": "system", "content": [], "output_config": {"effort": "low"}},1277 {"role": "user", "content": "Summarize the plan in one sentence."}1278 ]1279 }'1280 ```12811282 <MultiFileExample language="cli" label="CLI">1283 ```bash CLI1284 ant beta:messages create \1285 --beta mid-conversation-output-config-2026-07-01 \1286 --transform 'content.#(type=="text").text' \1287 --raw-output < request.yaml1288 ```12891290 <File filename="request.yaml">1291 ```yaml1292 model: claude-fable-5-11293 max_tokens: 40961294 output_config:1295 effort: high1296 messages:1297 - role: user1298 content: Plan a migration from SQLite to PostgreSQL in three short steps.1299 - role: assistant1300 content: "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."1301 # Effort-only system message: the new level takes effect from the next user turn.1302 - role: system1303 content: []1304 output_config:1305 effort: low1306 - role: user1307 content: Summarize the plan in one sentence.1308 ```1309 </File>1310 </MultiFileExample>13111312 ```python Python1313 client = anthropic.Anthropic()13141315 response = client.beta.messages.create(1316 model="claude-fable-5-1",1317 max_tokens=4096,1318 output_config={"effort": "high"},1319 messages=[1320 {1321 "role": "user",1322 "content": "Plan a migration from SQLite to PostgreSQL in three short steps.",1323 },1324 {1325 "role": "assistant",1326 "content": "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.",1327 },1328 # Effort-only system message: the new level takes effect from the next user turn.1329 {"role": "system", "content": [], "output_config": {"effort": "low"}},1330 {"role": "user", "content": "Summarize the plan in one sentence."},1331 ],1332 betas=["mid-conversation-output-config-2026-07-01"],1333 )13341335 for block in response.content:1336 if block.type == "text":1337 print(block.text)1338 ```13391340 ```typescript TypeScript1341 const client = new Anthropic();13421343 const response = await client.beta.messages.create({1344 model: "claude-fable-5-1",1345 max_tokens: 4096,1346 output_config: { effort: "high" },1347 messages: [1348 {1349 role: "user",1350 content: "Plan a migration from SQLite to PostgreSQL in three short steps."1351 },1352 {1353 role: "assistant",1354 content:1355 "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."1356 },1357 // Effort-only system message: the new level takes effect from the next user turn.1358 { role: "system", content: [], output_config: { effort: "low" } },1359 { role: "user", content: "Summarize the plan in one sentence." }1360 ],1361 betas: ["mid-conversation-output-config-2026-07-01"]1362 });13631364 for (const block of response.content) {1365 if (block.type === "text") {1366 console.log(block.text);1367 }1368 }1369 ```13701371 ```csharp C#1372 using Anthropic.Models.Beta;1373 using Anthropic.Models.Beta.Messages;13741375 AnthropicClient client = new();13761377 var response = await client.Beta.Messages.Create(new MessageCreateParams1378 {1379 Model = "claude-fable-5-1",1380 MaxTokens = 4096,1381 OutputConfig = new() { Effort = Effort.High },1382 Messages =1383 [1384 new() { Role = Role.User, Content = "Plan a migration from SQLite to PostgreSQL in three short steps." },1385 new() { Role = Role.Assistant, Content = "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts." },1386 // Effort-only system message: the new level takes effect from the next user turn.1387 new()1388 {1389 Role = Role.System,1390 Content = new([]),1391 OutputConfig = new() { Effort = BetaSystemMessageOutputConfigEffort.Low },1392 },1393 new() { Role = Role.User, Content = "Summarize the plan in one sentence." },1394 ],1395 Betas = [AnthropicBeta.MidConversationOutputConfig2026_07_01],1396 });13971398 foreach (var block in response.Content)1399 {1400 if (block.TryPickText(out var textBlock))1401 {1402 Console.WriteLine(textBlock.Text);1403 }1404 }1405 ```14061407 ```go Go1408 client := anthropic.NewClient()14091410 response, err := client.Beta.Messages.New(context.Background(), anthropic.BetaMessageNewParams{1411 Model: "claude-fable-5-1",1412 MaxTokens: 4096,1413 OutputConfig: anthropic.BetaOutputConfigParam{1414 Effort: anthropic.BetaOutputConfigEffortHigh,1415 },1416 Messages: []anthropic.BetaMessageParam{1417 anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Plan a migration from SQLite to PostgreSQL in three short steps.")),1418 {1419 Role: anthropic.BetaMessageParamRoleAssistant,1420 Content: []anthropic.BetaContentBlockParamUnion{anthropic.NewBetaTextBlock("1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.")},1421 },1422 // Effort-only system message: the new level takes effect from the next user turn.1423 anthropic.NewBetaSystemMessage(anthropic.BetaSystemMessageOutputConfigParam{1424 Effort: anthropic.BetaSystemMessageOutputConfigEffortLow,1425 }),1426 anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Summarize the plan in one sentence.")),1427 },1428 Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaMidConversationOutputConfig2026_07_01},1429 })1430 if err != nil {1431 log.Fatal(err)1432 }14331434 for _, block := range response.Content {1435 if textBlock, ok := block.AsAny().(anthropic.BetaTextBlock); ok {1436 fmt.Println(textBlock.Text)1437 }1438 }1439 ```14401441 ```java Java1442 import com.anthropic.models.beta.AnthropicBeta;1443 import com.anthropic.models.beta.messages.BetaMessage;1444 import com.anthropic.models.beta.messages.BetaMessageParam;1445 import com.anthropic.models.beta.messages.BetaOutputConfig;1446 import com.anthropic.models.beta.messages.BetaSystemMessageOutputConfig;1447 import com.anthropic.models.beta.messages.MessageCreateParams;14481449 void main() {1450 AnthropicClient client = AnthropicOkHttpClient.fromEnv();14511452 MessageCreateParams params = MessageCreateParams.builder()1453 .model("claude-fable-5-1")1454 .maxTokens(4096L)1455 .addBeta(AnthropicBeta.MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01)1456 .outputConfig(BetaOutputConfig.builder()1457 .effort(BetaOutputConfig.Effort.HIGH)1458 .build())1459 .addUserMessage("Plan a migration from SQLite to PostgreSQL in three short steps.")1460 .addAssistantMessage("1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.")1461 // Effort-only system message: the new level takes effect from the next user turn.1462 .addMessage(BetaMessageParam.builder()1463 .role(BetaMessageParam.Role.SYSTEM)1464 .contentOfBetaContentBlockParams(List.of())1465 .outputConfig(BetaSystemMessageOutputConfig.builder()1466 .effort(BetaSystemMessageOutputConfig.Effort.LOW)1467 .build())1468 .build())1469 .addUserMessage("Summarize the plan in one sentence.")1470 .build();14711472 BetaMessage response = client.beta().messages().create(params);1473 response.content().stream()1474 .flatMap(block -> block.text().stream())1475 .forEach(textBlock -> IO.println(textBlock.text()));1476 }1477 ```14781479 ```php PHP1480 use Anthropic\Beta\AnthropicBeta;1481 use Anthropic\Beta\Messages\BetaMessageParam;1482 use Anthropic\Beta\Messages\BetaOutputConfig;1483 use Anthropic\Beta\Messages\BetaSystemMessageOutputConfig;1484 use Anthropic\Client;14851486 $client = new Client();14871488 $response = $client->beta->messages->create(1489 model: 'claude-fable-5-1',1490 maxTokens: 4096,1491 outputConfig: BetaOutputConfig::with(effort: 'high'),1492 messages: [1493 BetaMessageParam::with(role: 'user', content: 'Plan a migration from SQLite to PostgreSQL in three short steps.'),1494 BetaMessageParam::with(role: 'assistant', content: '1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.'),1495 // Effort-only system message: the new level takes effect from the next user turn.1496 BetaMessageParam::with(1497 role: 'system',1498 content: [],1499 outputConfig: BetaSystemMessageOutputConfig::with(effort: 'low'),1500 ),1501 BetaMessageParam::with(role: 'user', content: 'Summarize the plan in one sentence.'),1502 ],1503 betas: [AnthropicBeta::MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01],1504 );15051506 foreach ($response->content as $block) {1507 if ($block->type === 'text') {1508 echo $block->text, PHP_EOL;1509 }1510 }1511 ```15121513 ```ruby Ruby1514 client = Anthropic::Client.new15151516 response = client.beta.messages.create(1517 model: "claude-fable-5-1",1518 max_tokens: 4096,1519 output_config: {effort: :high},1520 messages: [1521 {role: "user", content: "Plan a migration from SQLite to PostgreSQL in three short steps."},1522 {role: "assistant", content: "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."},1523 # Effort-only system message: the new level takes effect from the next user turn.1524 {role: "system", content: [], output_config: {effort: :low}},1525 {role: "user", content: "Summarize the plan in one sentence."}1526 ],1527 betas: [Anthropic::AnthropicBeta::MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01]1528 )15291530 response.content.each do |block|1531 puts block.text if block.type == :text1532 end1533 ```1534 </CodeGroup>15351536 The value applies to the following user turn and every later turn until another `role: "system"` message changes it. Only the named levels are accepted (`low`, `medium`, `high`, `xhigh`, `max`), and the `mid-conversation-output-config-2026-07-01` beta header is required. See [Per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta).153715382. **Change instructions and tools with mid-conversation system messages:** To change instructions or tools partway through a session, append a [`role: "system"` message](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages), with `tool_addition` and `tool_removal` blocks for tool changes (beta header `mid-conversation-tool-changes-2026-07-01`, with the full tool set declared in `tools` at session start). This preserves prompt cache hits on earlier turns and keeps the conversation history append-only. The same message replaces forced `tool_choice` when a specific tool must run on the current turn (see [Breaking changes](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-breaking-changes)). For a reminder that applies to one turn only, send it as a separate text-only `role: "system"` message with `clear_at: "next_user_message"` ([turn-scoped system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#turn-scoped-system-messages), beta header `mid-conversation-system-clear-at-2026-08-21`) and leave it in the history: it stops rendering after the next user message and costs no tokens once cleared. A message that carries `tool_addition` or `tool_removal` blocks can't be turn-scoped.153915403. **Use `fallbacks: "default"` for refusals:** Keep handling `stop_reason: "refusal"` and reading `stop_details.category` before response content. To re-run refused requests on another model automatically, set `fallbacks: "default"` (beta, `server-side-fallback-2026-07-01` header). `"default"` retries a declined request on the model Anthropic recommends for that category. The permitted fallback targets for Claude Fable 5.1 are Claude Opus 4.8 (`claude-opus-4-8`) and Claude Opus 5 (`claude-opus-5`). An explicit `fallbacks` list may name either. The fallback model doesn't receive Claude Fable 5.1's thinking blocks. If you build the retry yourself, [fallback credit](https://platform.claude.com/docs/en/build-with-claude/fallback-credit) applies on the same terms as Claude Fable 5. See [Refusals and fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback).154115424. **Start at `high` effort and sweep:** The [effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort) default is `high`, and all five levels are supported. Keep the Claude Fable 5 guidance: `high` for most work, and `medium` as a cost control worth testing. Claude Fable 5.1's gains over Claude Fable 5 are largest at `xhigh` and `max`, but those levels also add thinking time and time-to-first-response, so step up to them for the most capability-sensitive tasks and where your evals show the gain. Run a fresh sweep on your own evals rather than carrying over a setting tuned for Claude Fable 5. See [Recommended effort levels for Claude Fable 5.1](https://platform.claude.com/docs/en/build-with-claude/effort#recommended-effort-levels-for-claude-fable-5-1).154315445. **Trim context on the server, or compact in a shape that carries no stale thinking:** If your code truncates or summarizes older turns on the client, the simplest fix is to move that work to server-side [compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) or [context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing). Neither counts as an edit, because the [history check](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-preserved-thinking) compares the conversation as you sent it, so nothing they remove invalidates later thinking blocks, and compaction's [`instructions` parameter](https://platform.claude.com/docs/en/build-with-claude/compaction#custom-summarization-instructions) accepts your own summarization prompt. If you keep recent turns verbatim behind the summary, or summarize in the background while the conversation continues, use [on-demand compaction](https://platform.claude.com/docs/en/build-with-claude/compaction#compact-on-demand-with-the-compaction-parameter) (beta header `compact-2026-09-04`, on the Claude API) rather than a client-written summary. The API writes a signed summary block that you put in place of the messages it summarizes. The thinking blocks in the turns you keep can stay valid, under the conditions that section lists. If you keep compaction on the client, pick one of three shapes:15451546 * **Simple compaction (recommended):** replace the whole history with one summary message plus the new user turn and replay nothing else. No thinking blocks are carried over, so nothing fails. Claude models are trained on long-horizon tasks with this scheme, and it performs comparably to more elaborate ones for most workloads.1547 * **Keep-tail compaction:** if you keep the most recent turns verbatim behind a summary, strip the `thinking` and `redacted_thinking` blocks from those turns (text and tool calls can stay), or set `prefix_mismatch_behavior: "drop_block"`. Their thinking was produced against the full history and fails behind the summary otherwise.1548 * **Background compaction:** if you build the summary off the critical path and swap it in later, every turn produced in the meantime carries thinking that predates the swap. Send `"drop_block"` on every request that still carries thinking blocks produced before the swap (or strip those blocks yourself; `input_transformations` on the first response after the swap lists exactly which ones), or compact synchronously.15491550 Don't snip individual turns out of the middle of the transcript: that invalidates every later thinking block and no client-side shape avoids it. Use a [mid-conversation system message](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages) for the instruction change you were making, or server-side [context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing) for selective removal. See [Passing compaction blocks back](https://platform.claude.com/docs/en/build-with-claude/compaction#passing-compaction-blocks-back).15511552### Migration checklist15531554* Update the model name from `claude-fable-5` to `claude-fable-5-1` (or `claude-mythos-5` to `claude-mythos-5-1`).1555* Replace forced `tool_choice` (`{type: "any"}` or `{type: "tool", ...}`). It returns a 400 error. Use `{type: "auto"}` plus an explicit instruction and `strict: true` tools, or JSON outputs. Put the instruction in the `user` turn, or in a mid-conversation `role: "system"` message when your application requires the call.1556* Keep passing `thinking` blocks back unchanged on every turn, including empty ones. Claude Fable 5.1 reads blocks from Claude Opus 5, Claude Fable 5, Claude Mythos 5, and earlier models. Moving a conversation from Claude Fable 5.1 to an earlier model drops its blocks (Claude Mythos 5.1 reads them).1557* If your code builds the `messages` array itself, check whether it [edits earlier turns](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-preserved-thinking): run a session with the `thinking-binding-controls-2026-08-01` beta header and `prefix_mismatch_behavior: "drop_block"`, log `input_transformations`, and fix every `prefix_binding_mismatch`. `model_binding_mismatch` entries after a model switch are expected.1558* Keep conversation history append-only: freeze `system` and `tools` at session start and move mid-session changes to `role: "system"` messages and `tool_addition` / `tool_removal` blocks, send per-turn reminders as turn-scoped system messages you never remove, trim context server-side or strip thinking blocks from any turns you carry across a client-side summary, and reference cross-turn files by `file_id`.1559* Pick a production `prefix_mismatch_behavior` (`"error"` by default, or `"drop_block"`) and monitor it. If you maintain a tool that others run with their own API key, test with the field set: new accounts are enforced by default even if yours isn't.1560* Review agent loops for one-tool-call-per-turn behavior and add the batching instruction.1561* If your interface renders progress text between tool calls, set `thinking.display` to `"updates"` (beta) or `"summarized"` and prompt for updates.1562* If you change effort between requests, move the change to a [per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) `role: "system"` message (beta) to keep cache hits.1563* Handle `stop_reason: "refusal"` and read `stop_details.category`. Consider `fallbacks: "default"` (beta).1564* Re-evaluate `effort` with a fresh sweep, starting at `high`, and re-baseline cost and latency on your own workloads. The tokenizer is unchanged. Prompt cache reads cost a quarter of the Claude Fable 5 rate.15651566## Migrating to Claude Fable 5.1 from Claude Opus 515671568Claude Fable 5.1 uses the same [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) and [tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) patterns as Claude Opus 5. It keeps the [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default, [128k max output tokens](https://platform.claude.com/docs/en/models/overview), the 512-token prompt caching minimum, and [mid-conversation system message](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages) support. The prefill restriction, the sampling-parameter restriction, and the `"omitted"` default for `thinking.display` also carry over. Apply everything in [Migrating to Claude Fable 5.1 from Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#migrating-from-claude-fable-5-to-claude-fable-5-1), plus the following.15691570### Update your model name15711572```python1573model = "claude-opus-5" # Before1574model = "claude-fable-5-1" # After15751576# Or, for the Project Glasswing model with the same capabilities:1577model = "claude-mythos-5-1" # After1578```15791580### What changed158115821. **Thinking can no longer be disabled:** Claude Opus 5 accepts `thinking: {type: "disabled"}` at an [effort](https://platform.claude.com/docs/en/build-with-claude/effort) level of `high` or lower. On `claude-fable-5-1` and `claude-mythos-5-1`, [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) is always on, and `thinking: {type: "disabled"}` returns a 400 error at any effort level. Remove the field, control token spend with lower effort levels, and revisit `max_tokens` for workloads that ran with thinking disabled.158315842. **Forced tool choice is not supported:** Claude Opus 5 accepts `tool_choice` `any` and `tool`. `claude-fable-5-1` returns a 400 error. See [Breaking changes](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-breaking-changes).158515863. **Preserved thinking across models:** Claude Fable 5.1 reads Claude Opus 5's thinking blocks: conversations moving from `claude-opus-5` to `claude-fable-5-1` keep their reasoning. Claude Opus 5 can't read Claude Fable 5.1's blocks. Claude Fable 5.1's blocks also [stop being valid when earlier turns change](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-preserved-thinking): if your code edits earlier messages, rebuilds `system` or `tools`, or compacts on the client between requests, Claude Opus 5 didn't object, but `claude-fable-5-1` rejects or drops every later thinking block. Run the three-step check in that section before switching traffic. See [Breaking changes](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-breaking-changes).158715884. **Text between tool calls is returned in thinking blocks:** On Claude Opus 5, text the model writes between tool calls comes back as `text` blocks. On `claude-fable-5-1`, as on Claude Fable 5, that narration comes back as progress-update `thinking` blocks, one before each tool call. Under the default `thinking.display` of `"omitted"`, they carry no readable text. If your interface renders that narration, set `display: "updates"` (beta) to receive progress updates as text while reasoning stays hidden, or `"summarized"` to receive both. Then render the non-empty `thinking` blocks between `tool_use` blocks. See [Progress updates between tool calls](https://platform.claude.com/docs/en/build-with-claude/thinking#progress-updates).158915905. **Safety classifiers and fallback routing:** Claude Fable 5.1 runs safety classifiers covering the same `stop_details` categories as Claude Fable 5, a broader set than Claude Opus 5's cybersecurity-only classifiers. Expect `stop_details.category` values beyond `"cyber"`, such as `"bio"` and `"reasoning_extraction"`; see the [refusal category table](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#refusal-response) for the full set. For `fallbacks` configuration and permitted targets, see [Use `fallbacks: "default"` for refusals](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-recommended-changes).159115926. **Pricing:** $10 USD per million input tokens and $50 USD per million output tokens, compared with $5 USD and $25 USD for Claude Opus 5. Prompt cache reads are $0.25 USD per million tokens, half the Claude Opus 5 rate. See [Claude pricing](https://platform.claude.com/docs/en/about-claude/pricing).159315947. **Data retention:** Claude Fable 5.1 and Claude Mythos 5.1 require 30-day data retention, aren't available under zero data retention (ZDR) arrangements unless expressly authorized by Anthropic, and are designated Covered Models. Claude Opus 5 is available under ZDR. See [Model-specific data retention requirements](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements).15951596### Migration checklist15971598* If your organization has a zero data retention (ZDR) arrangement, confirm eligibility first: these models aren't available under ZDR unless expressly authorized by Anthropic. See [Model-specific data retention requirements](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements).1599* Update the model name from `claude-opus-5` to `claude-fable-5-1` (or `claude-mythos-5-1`).1600* Remove any `thinking: {type: "disabled"}` configuration: it returns a 400 error on `claude-fable-5-1`. Control token spend with lower [effort](https://platform.claude.com/docs/en/build-with-claude/effort) levels, and revisit `max_tokens`.1601* Replace forced `tool_choice` (`any` or `tool`) with `auto` plus an explicit instruction (`user` turn or mid-conversation system message) and `strict: true` tools, or with JSON outputs.1602* If your interface renders text between tool calls, set `display: "updates"` (beta) or `"summarized"` and render the non-empty `thinking` blocks.1603* Apply the preserved-thinking, history-editing, behavior, effort, and fallback items from the [Claude Fable 5 checklist](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#migration-checklist-fable-5-1-from-fable-5).1604* Re-baseline cost on your own workloads. The tokenizer is unchanged. Per-token pricing differs.16051606## Migrating to Claude Fable 5.1 from Claude Opus 4.8 or earlier16071608First apply [Migrating to Claude Mythos 5 and Claude Fable 5 from Claude Opus 4.8](https://platform.claude.com/docs/en/models/fable-5/migration-guide#migrating-from-claude-opus-48) for the API-level changes from Claude Opus 4.8. It covers adaptive thinking, thinking output, refusals, effort, the caching minimum, pricing, and data retention. Then apply the remaining delta in [Migrating to Claude Fable 5.1 from Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#migrating-from-claude-fable-5-to-claude-fable-5-1). On Claude Opus 4.7 or earlier, start with the matching [Migrating to Claude Opus 5](https://platform.claude.com/docs/en/models/opus-5/migration-guide) section.16091610### Update your model name16111612```python1613model = "claude-opus-4-8" # Before1614model = "claude-fable-5-1" # After16151616# Or, for the Project Glasswing model with the same capabilities:1617model = "claude-mythos-5-1" # After1618```16191620### Migration checklist16211622* If your organization has a zero data retention (ZDR) arrangement, confirm eligibility first: these models aren't available under ZDR unless expressly authorized by Anthropic. Claude Opus 4.8 is available under ZDR.1623* Update the model name from `claude-opus-4-8` to `claude-fable-5-1` (or `claude-mythos-5-1`).1624* Remove any `thinking: {type: "disabled"}` configuration and revisit `max_tokens`. Requests without a `thinking` field run with adaptive thinking.1625* Replace forced `tool_choice` (`any` or `tool`) with `auto` plus an explicit instruction (`user` turn or mid-conversation system message) and `strict: true` tools, or with JSON outputs.1626* Pass `thinking` blocks back unchanged and treat their text as display-only. Claude Fable 5.1 reads Claude Opus 4.8's thinking blocks: a conversation that moves onto `claude-fable-5-1` keeps its earlier reasoning. Claude Opus 4.8 can't read Claude Fable 5.1's blocks.1627* If your code builds the `messages` array itself, check whether it [edits earlier turns](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-preserved-thinking). Integrations written for Claude Opus 4.8 and earlier often truncate old turns, strip or rebuild earlier messages, or refresh the `system` prompt each request, and Claude Opus 4.8 never objected. On `claude-fable-5-1` each of those invalidates later thinking blocks.1628* Handle `stop_reason: "refusal"`, read `stop_details.category`, and consider `fallbacks: "default"` (beta).1629* Apply the preserved-thinking, history-editing, behavior, per-message effort, and progress-update items from the [Claude Fable 5 checklist](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#migration-checklist-fable-5-1-from-fable-5).1630* Re-evaluate `effort` (start at `high`), review prompts near the 512-token caching minimum, and re-baseline cost and latency. Per-token pricing differs.16311632## Migrating to Claude Mythos 5.1 from Claude Mythos 516331634[Claude Mythos 5.1](https://anthropic.com/glasswing) is the access-gated counterpart to Claude Fable 5.1. Confirm your organization's access with your Anthropic account team before switching model IDs.16351636The API-level delta matches [Migrating to Claude Fable 5.1 from Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#migrating-from-claude-fable-5-to-claude-fable-5-1): forced tool choice returns a 400 error, and thinking blocks are preserved only for the model that produced them or a newer one (Claude Mythos 5.1 reads Claude Mythos 5's blocks, not the reverse). Unlike Claude Fable 5.1, Claude Mythos 5.1 doesn't run the conversation check, so editing earlier turns doesn't [invalidate thinking blocks](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-preserved-thinking), though it still restarts the prompt cache.16371638### Update your model name16391640```python1641model = "claude-mythos-5" # Before1642model = "claude-mythos-5-1" # After1643```16441645### Migration checklist16461647* Update the model name from `claude-mythos-5` to `claude-mythos-5-1`.1648* Replace forced `tool_choice` (`any` or `tool`) with `auto` plus an explicit instruction (`user` turn or mid-conversation system message) and `strict: true` tools, or with JSON outputs.1649* Handle `stop_reason: "refusal"` and read `stop_details.category` before response content. See [Refusals and fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback).1650* Keep passing `thinking` blocks back unchanged on every turn, including empty ones.1651* If your code builds the `messages` array itself, keep conversation history append-only to keep the prompt cache warm. Claude Mythos 5.1 doesn't run the [conversation check](https://platform.claude.com/docs/en/build-with-claude/thinking#preserved-in-conversation), so edits don't invalidate its thinking blocks.1652* Apply the behavior and recommended changes from the [Claude Fable 5 section](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#migrating-from-claude-fable-5-to-claude-fable-5-1), except the history-editing items, which don't apply to Claude Mythos 5.1.1653* Re-evaluate `effort` with a fresh sweep and re-baseline cost and latency. Prompt cache reads cost a quarter of the Claude Mythos 5 rate.1654