# Fable 5.1

Move an app from Claude Fable 5 to Claude Fable 5.1: the model ID changes, and the way you call tools with it.

1. [Change the model ID](#1-change-the-model-id).
2. [Update the request](#2-update-the-request).
3. [Read the answer](#3-read-the-answer).
4. [Set the effort](#4-set-the-effort).
5. [Compare before you switch](#5-compare-before-you-switch).

## 1. Change the model ID

| | From | To |
|---|---|---|
| Model ID | `anthropic/claude-fable-5` | `anthropic/claude-fable-5.1` |
| Context | 1 000 000 tokens | 1 000 000 tokens |
| Longest answer | 128 000 tokens | 128 000 tokens |
| Reasoning | always on | always on |
| Effort levels | `low` · `medium` · `high` · `xhigh` · `max` | the same five |
| A forced tool call | taken | refused |

[`GET /v1/model/{lab}/{model}`](/docs/reference/model) answers each model's entry: its context, its longest answer, its `reasoning`. The request keeps its shape; `model` changes.

```json
{
  "model": "anthropic/claude-fable-5.1",
  "reasoning": {
    "effort": "high"
  },
  "messages": [
    {
      "role": "user",
      "content": "Plan the move of our orders table to the new schema."
    }
  ]
}
```

## 2. Update the request

| You send today | On Fable 5.1 | Send instead |
|---|---|---|
| `tool_choice` set to `required` or to one tool by name; `any` or `tool` on `/v1/messages` | refused | `auto`, with the prompt naming the tool to use |

A forced call would skip the reasoning, and the model would write its working into the tool's arguments. `auto` lets the model decide, so check that a call came back and ask again if not: see [Tools and function calling](/docs/tools). Where a forced call only served to get JSON back, ask for it with [Structured outputs](/docs/structured-outputs).

Two additions, both on `/v1/messages` and both in beta at Anthropic, change a setting for one turn without rewriting the conversation.

| To | Add, before the user turn it applies to |
|---|---|
| change the effort for one turn | a `system` message with empty `content` and `output_config.effort` |
| give an instruction for one turn | a `system` message with `clear_at: "next_user_message"` |

```json
{
  "model": "anthropic/claude-fable-5.1",
  "max_tokens": 16000,
  "output_config": {
    "effort": "high"
  },
  "messages": [
    {
      "role": "user",
      "content": "Plan the move of our orders table."
    },
    {
      "role": "assistant",
      "content": "Here is the plan: …"
    },
    {
      "role": "system",
      "content": [],
      "output_config": {
        "effort": "low"
      }
    },
    {
      "role": "user",
      "content": "Now rename the config file."
    }
  ]
}
```

## 3. Read the answer

Fable 5.1 ties each block of reasoning to the model that wrote it and to the conversation before it.

| Case | What happens |
|---|---|
| a conversation moves from Fable 5 or an older model onto Fable 5.1 | its reasoning carries over |
| a conversation moves from Fable 5.1 onto an older model | that model cannot read Fable 5.1's reasoning, and runs without it |
| an earlier turn, the system prompt or the tool list is edited | the reasoning written after it no longer holds |

<div class="dont">
<p>Edit an earlier turn, the system prompt or the tool list mid-conversation.</p>
</div>

<div class="do">
<p>Add to the conversation instead: a new instruction goes in a new message, and <code>thinking</code> blocks go back unchanged with tool results.</p>
</div>

Anthropic lists three changes that come with no change to your code.

| Fable 5.1 | Where Fable 5 |
|---|---|
| may call one tool per turn in a long agent loop | batched several |
| writes fewer progress notes between tool calls | wrote more |
| answers from memory more often at `low` effort | searched more often |

Ask in the prompt for the calls and notes you need. On `/v1/messages`, `thinking.display` set to `updates` returns the progress notes it does write, in beta at Anthropic.

## 4. Set the effort

Reasoning is always on; effort sets how long it runs, and so what an answer costs.

| Route | Field |
|---|---|
| `/v1/chat/completions` | `reasoning.effort`, or `reasoning_effort` |
| `/v1/messages` | `output_config.effort` |

Anthropic gives `high` as the default. Set the level in every request: lower it for routine turns where answers hold, and raise it on turns that need a fresh search.

## 5. Compare before you switch

Send the same set of real prompts to both IDs, and compare three things.

| Compare | Where |
|---|---|
| the answers | your own check: a test suite, a reviewer, the task's pass rate |
| what each cost | `usage.cost`, in DA, on every answer |
| how much each reasoned | `usage.completion_tokens_details.reasoning_tokens` |

The script sends one question that needs a tool three ways: a forced call on the old ID, a forced call on the new ID, and `auto` on the new ID. A refused request prints its status; an answer prints the tools the model called. A line that reads `nothing` is the check from step 2: no call came back, so ask again.

| Run | Model | `tool_choice` |
|---|---|---|
| `old, forced` | `MODEL` | the tool, by name |
| `new, forced` | `CANDIDATE` | the tool, by name |
| `new, auto` | `CANDIDATE` | `auto`, with the tool named in the system prompt |

```python
import os
from openai import APIStatusError, OpenAI

API_KEY = os.environ["OPENDUNES_API_KEY"]
BASE_URL = "https://opendunes.com/v1"
MODEL = "anthropic/claude-sonnet-4.5"
CANDIDATE = "anthropic/claude-sonnet-4.5"
MAX_TOKENS = 4000
BRIEF = "Use lookup_order to answer any question about an order."
PROMPT = "Where is order 4812?"
TOOLS = [
    {
        "type": "function",
        "function": {
            "name": "lookup_order",
            "description": "Look an order up by its number.",
            "parameters": {
                "type": "object",
                "properties": {"order_id": {"type": "string"}},
                "required": ["order_id"],
            },
        },
    }
]
FORCED = {"type": "function", "function": {"name": "lookup_order"}}
RUNS = [
    ("old, forced", MODEL, FORCED),
    ("new, forced", CANDIDATE, FORCED),
    ("new, auto", CANDIDATE, "auto"),
]

client = OpenAI(base_url=BASE_URL, api_key=API_KEY)

for label, model, choice in RUNS:
    try:
        reply = client.chat.completions.create(
            model=model,
            max_tokens=MAX_TOKENS,
            messages=[
                {"role": "system", "content": BRIEF},
                {"role": "user", "content": PROMPT},
            ],
            extra_body={"tools": TOOLS, "tool_choice": choice},
        )
    except APIStatusError as error:
        print(f"{label:12} refused, status {error.status_code}")
        continue
    message = reply.choices[0].message
    called = [call.function.name for call in message.tool_calls or []]
    print(
        f"{label:12} called {called or 'nothing'}",
        f"cost {reply.usage.cost}",
    )
```

```javascript
import OpenAI from "openai";

const API_KEY = process.env.OPENDUNES_API_KEY;
const BASE_URL = "https://opendunes.com/v1";
const MODEL = "anthropic/claude-sonnet-4.5";
const CANDIDATE = "anthropic/claude-sonnet-4.5";
const MAX_TOKENS = 4000;
const BRIEF = "Use lookup_order to answer any question about an order.";
const PROMPT = "Where is order 4812?";
const TOOLS = [
  {
    type: "function",
    function: {
      name: "lookup_order",
      description: "Look an order up by its number.",
      parameters: {
        type: "object",
        properties: { order_id: { type: "string" } },
        required: ["order_id"],
      },
    },
  },
];
const FORCED = { type: "function", function: { name: "lookup_order" } };
const RUNS = [
  ["old, forced", MODEL, FORCED],
  ["new, forced", CANDIDATE, FORCED],
  ["new, auto", CANDIDATE, "auto"],
];

const client = new OpenAI({ baseURL: BASE_URL, apiKey: API_KEY });

for (const [label, model, choice] of RUNS) {
  let reply;
  try {
    reply = await client.chat.completions.create({
      model,
      max_tokens: MAX_TOKENS,
      messages: [
        { role: "system", content: BRIEF },
        { role: "user", content: PROMPT },
      ],
      tools: TOOLS,
      tool_choice: choice,
    });
  } catch (error) {
    if (!(error instanceof OpenAI.APIError)) throw error;
    console.log(label.padEnd(12), "refused, status", error.status);
    continue;
  }
  const calls = reply.choices[0].message.tool_calls ?? [];
  const called = calls.map((call) => call.function.name);
  console.log(
    label.padEnd(12),
    "called",
    called.length ? called : "nothing",
    `cost ${reply.usage.cost}`,
  );
}
```

```go
package main

import (
	"context"
	"errors"
	"fmt"
	"os"
	"strconv"

	"github.com/openai/openai-go/v3"
	"github.com/openai/openai-go/v3/option"
)

const (
	baseURL   = "https://opendunes.com/v1"
	model     = "anthropic/claude-sonnet-4.5"
	candidate = "anthropic/claude-sonnet-4.5"
	maxTokens = 4000
	brief     = "Use lookup_order to answer any question about an order."
	prompt    = "Where is order 4812?"
)

type run struct {
	label  string
	model  string
	choice any
}

func main() {
	apiKey := os.Getenv("OPENDUNES_API_KEY")

	tools := []map[string]any{{
		"type": "function",
		"function": map[string]any{
			"name":        "lookup_order",
			"description": "Look an order up by its number.",
			"parameters": map[string]any{
				"type": "object",
				"properties": map[string]any{
					"order_id": map[string]any{"type": "string"},
				},
				"required": []string{"order_id"},
			},
		},
	}}
	forced := map[string]any{
		"type":     "function",
		"function": map[string]any{"name": "lookup_order"},
	}
	runs := []run{
		{"old, forced", model, forced},
		{"new, forced", candidate, forced},
		{"new, auto", candidate, "auto"},
	}

	client := openai.NewClient(
		option.WithBaseURL(baseURL),
		option.WithAPIKey(apiKey),
	)
	for _, r := range runs {
		params := openai.ChatCompletionNewParams{
			Model:     openai.ChatModel(r.model),
			MaxTokens: openai.Int(maxTokens),
			Messages: []openai.ChatCompletionMessageParamUnion{
				openai.SystemMessage(brief),
				openai.UserMessage(prompt),
			},
		}
		params.SetExtraFields(map[string]any{
			"tools":       tools,
			"tool_choice": r.choice,
		})
		reply, err := client.Chat.Completions.New(context.TODO(), params)
		var apiErr *openai.Error
		if errors.As(err, &apiErr) {
			fmt.Printf("%-12s refused, status %d\n", r.label, apiErr.StatusCode)
			continue
		}
		if err != nil {
			panic(err)
		}
		called := []string{}
		for _, call := range reply.Choices[0].Message.ToolCalls {
			called = append(called, call.Function.Name)
		}
		fmt.Printf("%-12s called %v cost %v\n", r.label, called, charge(reply))
	}
}

func charge(reply *openai.ChatCompletion) float64 {
	cost := reply.Usage.JSON.ExtraFields["cost"].Raw()
	value, _ := strconv.ParseFloat(cost, 64)
	return value
}
```

```bash cURL
ADDRESS="https://opendunes.com/v1/chat/completions"
MODEL="anthropic/claude-sonnet-4.5"
CANDIDATE="anthropic/claude-sonnet-4.5"
BRIEF="Use lookup_order to answer any question about an order."
PROMPT="Where is order 4812?"
TOOLS='[{"type": "function", "function": {
  "name": "lookup_order",
  "description": "Look an order up by its number.",
  "parameters": {
    "type": "object",
    "properties": {"order_id": {"type": "string"}},
    "required": ["order_id"]}}}]'
FORCED='{"type": "function", "function": {"name": "lookup_order"}}'
AUTO='"auto"'

run() {
  jq -n --arg model "$2" --arg brief "$BRIEF" --arg prompt "$PROMPT" \
    --argjson tools "$TOOLS" --argjson choice "$3" \
    '{model: $model, max_tokens: 4000, tools: $tools,
      tool_choice: $choice,
      messages: [{role: "system", content: $brief},
                 {role: "user", content: $prompt}]}' |
    curl -s "$ADDRESS" \
      -H "Authorization: Bearer $OPENDUNES_API_KEY" \
      -H "Content-Type: application/json" \
      -d @- |
    jq -c --arg label "$1" '{label: $label,
      called: [.choices[0].message.tool_calls[]?.function.name],
      cost: .usage.cost,
      refused: .error.message}'
}

run "old, forced" "$MODEL" "$FORCED"
run "new, forced" "$CANDIDATE" "$FORCED"
run "new, auto" "$CANDIDATE" "$AUTO"
```

The samples put `anthropic/claude-sonnet-4.5` in both seats, so they run as they stand: both forced runs call the tool. Set `MODEL` to `anthropic/claude-fable-5` and `CANDIDATE` to `anthropic/claude-fable-5.1`: the second run is then refused, and the third is the one to keep.

Where a line reads `nothing`, the model chose to answer without the tool. Name the tool in the prompt more plainly, or ask again once; do not go back to a forced call.

Switch once the new ID holds; going back is the same one-line change. Run your red-team suite on the new ID too: [Red teaming](/docs/cookbook/red-teaming).
