注意

本指南涵盖 Messages API 代码的迁移。如果您使用 Claude Managed Agents,则除了更新模型名称之外无需进行任何更改。

让 Claude Code 为您迁移代码

/claude-api migrate 将此项目迁移到 claude-fable-5-1

Claude Fable 5.1 接替 Claude Fable 5,输入和输出价格保持不变,缓存读取费用仅为原来的四分之一。它可在 Claude API、Amazon Bedrock、Claude Platform on AWS、Claude Models on Google Cloud (Anthropic managed)、Claude Models on Google Cloud (Google managed) 和 Microsoft Foundry 上使用。Claude Fable 5.1 无需访问审批。Claude Mythos 5.1 具有相同的能力,但仅向通过 Anthropic 验证计划(例如 Cyber Verification Program)验证的组织开放。如需申请访问权限,请申请涵盖您用例的计划,或联系您的 Anthropic 客户团队。有关行为差异和提示模式,请参阅为 Claude Fable 5.1 编写提示。

claude-fable-5-1 和 claude-mythos-5-1 共享的基线设置:

  • 思考: Adaptive thinking(自适应思考)始终开启,与 Claude Fable 5 相同。模型自行决定何时思考以及思考多少。无需任何 thinking 配置。thinking: {type: "disabled"} 和手动扩展思考(thinking: {type: "enabled", budget_tokens: N})都会返回 400 错误。
  • 预填充: 预填充 assistant 消息会返回 400 错误,与 Claude Fable 5 相同。请改用系统提示指令。
  • 工具选择: 支持 {type: "auto"}(默认)和 {type: "none"}。使用 {type: "any"} 或 {type: "tool", name: "..."} 强制调用工具会返回 400 错误。请参阅破坏性变更。
  • 跨模型保留思考: Claude Fable 5.1 和 Claude Mythos 5.1 可以读取来自 Claude Opus 5、Claude Fable 5、Claude Mythos 5 及更早 Claude 模型的思考块。这些模型都无法读取来自 Claude Fable 5.1 或 Claude Mythos 5.1 的思考块。请参阅破坏性变更。
  • 编辑较早的轮次: 只有在其之前发送的所有内容均保持不变时,思考块才保持有效,因此请让对话历史保持仅追加(append-only)。请参阅编辑较早的轮次会使思考块失效。
  • 上下文窗口和输出: 两个模型都具有 1M 令牌的上下文窗口,每个请求最多返回 128k 输出令牌。
  • 定价: 每百万输入令牌 10 美元,每百万输出令牌 50 美元,与 Claude Fable 5 相同。提示缓存读取为每百万令牌 0.25 美元,是 Claude Fable 5 费率的四分之一。请参阅 Claude 定价。
  • 数据保留: 两个模型都要求 30 天数据保留,除非获得 Anthropic 明确授权,否则不适用于零数据保留(ZDR)安排,并且被指定为受管辖模型(Covered Models),与 Claude Fable 5 和 Claude Mythos 5 相同。在 Claude API 上,来自未启用 30 天保留的组织或工作区的请求会返回 400 invalid_request_error。具有 ZDR 安排的组织应联系其 Anthropic 客户团队,或为单个工作区配置保留策略。有关各平台的详细信息,请参阅特定模型的数据保留要求。
  • Priority Tier: 两个模型都不支持 Priority Tier。Claude Fable 5 支持。

从 Claude Fable 5 迁移到 Claude Fable 5.1

迁移基本上可以直接替换。API 接口、限制、按令牌定价、分词器、始终开启的自适应思考、拒绝处理以及 stop_details 类别都与 Claude Fable 5 一致。以下变更适用:

  • 强制工具调用的请求会收到 400 错误。
  • 只有 Claude Fable 5.1 和 Claude Mythos 5.1 能读取 Claude Fable 5.1 的思考块。
  • 编辑较早的轮次会使后续的思考块失效。
  • 缓存读取成本更低。
  • 顾问工具(beta)接受的顾问更少。
  • 智能体循环行为在三个方面有所不同。

更新您的模型名称

model = "claude-fable-5"  # Before
model = "claude-fable-5-1"  # After

# 或者,对于 Claude Mythos 5.1(向经过验证的组织提供相同的功能):
model = "claude-mythos-5-1"  # After

破坏性变更

  1. 不支持强制工具选择: Claude Fable 5 接受 tool_choice 的 auto、none、any 和 tool。在 claude-fable-5-1 上,{type: "any"} 和 {type: "tool", name: "..."} 会返回 400 invalid_request_error:

    tool_choice: type "tool" and "any" are not supported for this model.

    此检查适用于 Messages API、Message Batches API 和令牌计数端点。

    之前(Claude Fable 5):

    cURL

    curl -sS https://api.anthropic.com/v1/messages \
      -H "content-type: application/json" \
      -H "x-api-key: $ANTHROPIC_API_KEY" \
      -H "anthropic-version: 2023-06-01" \
      -d '{
        "model": "claude-fable-5",
        "max_tokens": 16000,
        "tools": [
          {
            "name": "record_summary",
            "description": "Record the structured summary of the document.",
            "input_schema": {
              "type": "object",
              "properties": {"summary": {"type": "string"}},
              "required": ["summary"]
            }
          }
        ],
        "tool_choice": {"type": "tool", "name": "record_summary"},
        "messages": [
          {"role": "user", "content": "Summarize: The meeting moved to Thursday."}
        ]
      }'

    CLI

    ant messages create <<'YAML'
    model: claude-fable-5
    max_tokens: 16000
    tools:
      - name: record_summary
        description: Record the structured summary of the document.
        input_schema:
          type: object
          properties:
            summary:
              type: string
          required: [summary]
    tool_choice:
      type: tool
      name: record_summary
    messages:
      - role: user
        content: "Summarize: The meeting moved to Thursday."
    YAML

    Python

    client = anthropic.Anthropic()
    
    record_summary_tool = {
        "name": "record_summary",
        "description": "Record the structured summary of the document.",
        "input_schema": {
            "type": "object",
            "properties": {"summary": {"type": "string"}},
            "required": ["summary"],
        },
    }
    
    response = client.messages.create(
        model="claude-fable-5",
        max_tokens=16000,
        tools=[record_summary_tool],
        tool_choice={"type": "tool", "name": "record_summary"},
        messages=[{"role": "user", "content": "Summarize: The meeting moved to Thursday."}],
    )
    print(response.content)

    TypeScript

    const client = new Anthropic();
    
    const response = await client.messages.create({
      model: "claude-fable-5",
      max_tokens: 16000,
      tools: [
        {
          name: "record_summary",
          description: "Record the structured summary of the document.",
          input_schema: {
            type: "object",
            properties: { summary: { type: "string" } },
            required: ["summary"]
          }
        }
      ],
      tool_choice: { type: "tool", name: "record_summary" },
      messages: [{ role: "user", content: "Summarize: The meeting moved to Thursday." }]
    });
    
    console.log(response.content);

    C#

    AnthropicClient client = new();
    
    var parameters = new MessageCreateParams
    {
        Model = Model.ClaudeFable5,
        MaxTokens = 16000,
        Tools = [
            new ToolUnion(new Tool()
            {
                Name = "record_summary",
                Description = "Record the structured summary of the document.",
                InputSchema = new InputSchema()
                {
                    Properties = new Dictionary<string, JsonElement>
                    {
                        ["summary"] = JsonSerializer.SerializeToElement(new { type = "string" }),
                    },
                    Required = ["summary"],
                },
            }),
        ],
        ToolChoice = new ToolChoiceTool { Name = "record_summary" },
        Messages = [new UserMessageParam { Content = "Summarize: The meeting moved to Thursday." }]
    };
    
    var message = await client.Messages.Create(parameters);
    Console.WriteLine(message);

    Go

    client := anthropic.NewClient()
    
    response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
    	Model:     anthropic.ModelClaudeFable5,
    	MaxTokens: 16000,
    	Tools: []anthropic.ToolUnionParam{
    		{OfTool: &anthropic.ToolParam{
    			Name:        "record_summary",
    			Description: anthropic.String("Record the structured summary of the document."),
    			InputSchema: anthropic.ToolInputSchemaParam{
    				Properties: map[string]any{
    					"summary": map[string]any{"type": "string"},
    				},
    				Required: []string{"summary"},
    			},
    		}},
    	},
    	ToolChoice: anthropic.ToolChoiceUnionParam{OfTool: &anthropic.ToolChoiceToolParam{Name: "record_summary"}},
    	Messages: []anthropic.MessageParam{
    		anthropic.NewUserMessage(anthropic.NewTextBlock("Summarize: The meeting moved to Thursday.")),
    	},
    })
    if err != nil {
    	log.Fatal(err)
    }
    fmt.Println(response.RawJSON())

    Java

    
    void main() {
        AnthropicClient client = AnthropicOkHttpClient.fromEnv();
    
        MessageCreateParams params = MessageCreateParams.builder()
            .model(Model.CLAUDE_FABLE_5)
            .maxTokens(16000L)
            .addTool(Tool.builder()
                .name("record_summary")
                .description("Record the structured summary of the document.")
                .inputSchema(InputSchema.builder()
                    .properties(JsonValue.from(Map.of("summary", Map.of("type", "string"))))
                    .required(List.of("summary"))
                    .build())
                .build())
            .toolChoice(ToolChoice.ofTool(ToolChoiceTool.builder()
                .name("record_summary")
                .build()))
            .addUserMessage("Summarize: The meeting moved to Thursday.")
            .build();
    
        Message response = client.messages().create(params);
        IO.println(response);
    }

    PHP

    $client = new Client();
    
    $message = $client->messages->create(
        maxTokens: 16000,
        messages: [
            ['role' => 'user', 'content' => 'Summarize: The meeting moved to Thursday.']
        ],
        model: Model::CLAUDE_FABLE_5,
        toolChoice: ['type' => 'tool', 'name' => 'record_summary'],
        tools: [
            [
                'name' => 'record_summary',
                'description' => 'Record the structured summary of the document.',
                'input_schema' => [
                    'type' => 'object',
                    'properties' => [
                        'summary' => ['type' => 'string']
                    ],
                    'required' => ['summary']
                ]
            ]
        ],
    );
    
    echo $message;

    Ruby

    client = Anthropic::Client.new
    
    message = client.messages.create(
      model: Anthropic::Model::CLAUDE_FABLE_5,
      max_tokens: 16000,
      tools: [
        {
          name: "record_summary",
          description: "Record the structured summary of the document.",
          input_schema: {
            type: "object",
            properties: { summary: { type: "string" } },
            required: ["summary"]
          }
        }
      ],
      tool_choice: { type: "tool", name: "record_summary" },
      messages: [
        { role: "user", content: "Summarize: The meeting moved to Thursday." }
      ]
    )
    puts message

    之后(Claude Fable 5.1):将 tool_choice 保持为 auto,在指令中指明工具,并设置 strict: true 使调用符合您的 schema。(在 CMEK 组织中,Claude Fable 模型不支持 structured outputs(结构化输出),包括 strict: true,因此只能依靠指令本身。)例如:

    cURL

    curl -sS https://api.anthropic.com/v1/messages \
      -H "content-type: application/json" \
      -H "x-api-key: $ANTHROPIC_API_KEY" \
      -H "anthropic-version: 2023-06-01" \
      -d '{
        "model": "claude-fable-5-1",
        "max_tokens": 16000,
        "tools": [
          {
            "name": "record_summary",
            "description": "Record the structured summary of the document.",
            "strict": true,
            "input_schema": {
              "type": "object",
              "properties": {"summary": {"type": "string"}},
              "required": ["summary"],
              "additionalProperties": false
            }
          }
        ],
        "tool_choice": {"type": "auto"},
        "messages": [
          {"role": "user", "content": "Summarize: The meeting moved to Thursday. Call the record_summary tool with your result."}
        ]
      }'

    CLI

    ant messages create <<'YAML'
    model: claude-fable-5-1
    max_tokens: 16000
    tools:
      - name: record_summary
        description: Record the structured summary of the document.
        strict: true
        input_schema:
          type: object
          properties:
            summary:
              type: string
          required: [summary]
          additionalProperties: false
    tool_choice:
      type: auto
    messages:
      - role: user
        content: "Summarize: The meeting moved to Thursday. Call the record_summary tool with your result."
    YAML

    Python

    client = anthropic.Anthropic()
    
    record_summary_tool = {
        "name": "record_summary",
        "description": "Record the structured summary of the document.",
        "strict": True,
        "input_schema": {
            "type": "object",
            "properties": {"summary": {"type": "string"}},
            "required": ["summary"],
            "additionalProperties": False,
        },
    }
    
    response = client.messages.create(
        model="claude-fable-5-1",
        max_tokens=16000,
        tools=[record_summary_tool],
        tool_choice={"type": "auto"},
        messages=[
            {
                "role": "user",
                "content": "Summarize: The meeting moved to Thursday. Call the record_summary tool with your result.",
            }
        ],
    )
    print(response.content)

    TypeScript

    const client = new Anthropic();
    
    const response = await client.messages.create({
      model: "claude-fable-5-1",
      max_tokens: 16000,
      tools: [
        {
          name: "record_summary",
          description: "Record the structured summary of the document.",
          strict: true,
          input_schema: {
            type: "object",
            properties: { summary: { type: "string" } },
            required: ["summary"],
            additionalProperties: false
          }
        }
      ],
      tool_choice: { type: "auto" },
      messages: [
        {
          role: "user",
          content:
            "Summarize: The meeting moved to Thursday. Call the record_summary tool with your result."
        }
      ]
    });
    
    console.log(response.content);

    C#

    AnthropicClient client = new();
    
    var parameters = new MessageCreateParams
    {
        Model = Model.ClaudeFable5_1,
        MaxTokens = 16000,
        Tools = [
            new ToolUnion(new Tool()
            {
                Name = "record_summary",
                Description = "Record the structured summary of the document.",
                Strict = true,
                InputSchema = new InputSchema(new Dictionary<string, JsonElement>
                {
                    ["properties"] = JsonSerializer.SerializeToElement(new Dictionary<string, object>
                    {
                        ["summary"] = new { type = "string" },
                    }),
                    ["required"] = JsonSerializer.SerializeToElement(new[] { "summary" }),
                    ["additionalProperties"] = JsonSerializer.SerializeToElement(false),
                }),
            }),
        ],
        ToolChoice = new ToolChoiceAuto(),
        Messages = [
            new UserMessageParam { Content = "Summarize: The meeting moved to Thursday. Call the record_summary tool with your result." }
        ]
    };
    
    var message = await client.Messages.Create(parameters);
    Console.WriteLine(message);

    Go

    client := anthropic.NewClient()
    
    response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
    	Model:     anthropic.ModelClaudeFable5_1,
    	MaxTokens: 16000,
    	Tools: []anthropic.ToolUnionParam{
    		{OfTool: &anthropic.ToolParam{
    			Name:        "record_summary",
    			Description: anthropic.String("Record the structured summary of the document."),
    			Strict:      anthropic.Bool(true),
    			InputSchema: anthropic.ToolInputSchemaParam{
    				Properties: map[string]any{
    					"summary": map[string]any{"type": "string"},
    				},
    				Required: []string{"summary"},
    				ExtraFields: map[string]any{
    					"additionalProperties": false,
    				},
    			},
    		}},
    	},
    	ToolChoice: anthropic.ToolChoiceUnionParam{OfAuto: &anthropic.ToolChoiceAutoParam{}},
    	Messages: []anthropic.MessageParam{
    		anthropic.NewUserMessage(anthropic.NewTextBlock("Summarize: The meeting moved to Thursday. Call the record_summary tool with your result.")),
    	},
    })
    if err != nil {
    	log.Fatal(err)
    }
    fmt.Println(response.RawJSON())

    Java

    
    void main() {
        AnthropicClient client = AnthropicOkHttpClient.fromEnv();
    
        MessageCreateParams params = MessageCreateParams.builder()
            .model(Model.CLAUDE_FABLE_5_1)
            .maxTokens(16000L)
            .addTool(Tool.builder()
                .name("record_summary")
                .description("Record the structured summary of the document.")
                .inputSchema(InputSchema.builder()
                    .properties(JsonValue.from(Map.of("summary", Map.of("type", "string"))))
                    .putAdditionalProperty("required", JsonValue.from(List.of("summary")))
                    .putAdditionalProperty("additionalProperties", JsonValue.from(false))
                    .build())
                .strict(true)
                .build())
            .toolChoice(ToolChoice.ofAuto(ToolChoiceAuto.builder().build()))
            .addUserMessage("Summarize: The meeting moved to Thursday. Call the record_summary tool with your result.")
            .build();
    
        Message response = client.messages().create(params);
        IO.println(response);
    }

    PHP

    $client = new Client();
    
    $message = $client->messages->create(
        maxTokens: 16000,
        messages: [
            ['role' => 'user', 'content' => 'Summarize: The meeting moved to Thursday. Call the record_summary tool with your result.']
        ],
        model: 'claude-fable-5-1',
        toolChoice: ['type' => 'auto'],
        tools: [
            [
                'name' => 'record_summary',
                'description' => 'Record the structured summary of the document.',
                'strict' => true,
                'input_schema' => [
                    'type' => 'object',
                    'properties' => [
                        'summary' => ['type' => 'string']
                    ],
                    'required' => ['summary'],
                    'additionalProperties' => false
                ]
            ]
        ],
    );
    
    echo $message;

    Ruby

    client = Anthropic::Client.new
    
    message = client.messages.create(
      model: Anthropic::Model::CLAUDE_FABLE_5_1,
      max_tokens: 16000,
      tools: [
        {
          name: "record_summary",
          description: "Record the structured summary of the document.",
          strict: true,
          input_schema: {
            type: "object",
            properties: { summary: { type: "string" } },
            required: ["summary"],
            additionalProperties: false
          }
        }
      ],
      tool_choice: { type: "auto" },
      messages: [
        { role: "user", content: "Summarize: The meeting moved to Thursday. Call the record_summary tool with your result." }
      ]
    )
    puts message

    请参阅严格工具使用和强制工具使用。如果您强制使用工具只是为了获得符合 schema 的 JSON,请改用 JSON 输出(output_config.format)。

    如果是您的应用程序(而非用户)要求在多轮对话的当前轮次调用特定工具,请在最新的 user 轮次之后追加一条对话中系统消息。指明该工具,说明本轮必须调用它,并告诉 Claude 以该调用开始其响应。由于该消息是追加的,而不是写入顶层 system 提示,先前的轮次保持字节级一致,并保留其提示缓存命中:

    cURL

    curl -sS https://api.anthropic.com/v1/messages \
      -H "content-type: application/json" \
      -H "x-api-key: $ANTHROPIC_API_KEY" \
      -H "anthropic-version: 2023-06-01" \
      -d '{
        "model": "claude-fable-5-1",
        "max_tokens": 16000,
        "system": "You are a customer support assistant for an online electronics store.",
        "tools": [
          {
            "name": "search_help_center",
            "description": "Search the help center for policy and troubleshooting articles.",
            "strict": true,
            "input_schema": {
              "type": "object",
              "properties": {"query": {"type": "string"}},
              "required": ["query"],
              "additionalProperties": false
            }
          }
        ],
        "messages": [
          {"role": "user", "content": "My headphones from order A1234 arrived yesterday."},
          {"role": "assistant", "content": "Thanks for confirming. How can I help with order A1234?"},
          {"role": "user", "content": "I opened the box. Can I still return them?"},
          {
            "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 latest message from the user. Begin your response with the search_help_center tool call. Do not reply with text only."
          }
        ]
      }'

    CLI

    ant messages create <<'YAML'
    model: claude-fable-5-1
    max_tokens: 16000
    system: You are a customer support assistant for an online electronics store.
    tools:
      - name: search_help_center
        description: Search the help center for policy and troubleshooting articles.
        strict: true
        input_schema:
          type: object
          properties:
            query:
              type: string
          required: [query]
          additionalProperties: false
    messages:
      - role: user
        content: My headphones from order A1234 arrived yesterday.
      - role: assistant
        content: Thanks for confirming. How can I help with order A1234?
      - role: user
        content: I opened the box. Can I still return them?
      - 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.
    YAML

    Python

    client = anthropic.Anthropic()
    
    search_help_center_tool = {
        "name": "search_help_center",
        "description": "Search the help center for policy and troubleshooting articles.",
        "strict": True,
        "input_schema": {
            "type": "object",
            "properties": {"query": {"type": "string"}},
            "required": ["query"],
            "additionalProperties": False,
        },
    }
    
    response = client.messages.create(
        model="claude-fable-5-1",
        max_tokens=16000,
        system="You are a customer support assistant for an online electronics store.",
        tools=[search_help_center_tool],
        messages=[
            {
                "role": "user",
                "content": "My headphones from order A1234 arrived yesterday.",
            },
            {
                "role": "assistant",
                "content": "Thanks for confirming. How can I help with order A1234?",
            },
            {"role": "user", "content": "I opened the box. Can I still return them?"},
            # 该应用要求在给出任何政策答复之前先查询帮助中心。
            # 将此要求作为系统消息追加,可使之前的
            # 轮次保持不变。
            {
                "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.",
            },
        ],
    )
    print(response.content)

    TypeScript

    const client = new Anthropic();
    
    const response = await client.messages.create({
      model: "claude-fable-5-1",
      max_tokens: 16000,
      system: "You are a customer support assistant for an online electronics store.",
      tools: [
        {
          name: "search_help_center",
          description: "Search the help center for policy and troubleshooting articles.",
          strict: true,
          input_schema: {
            type: "object",
            properties: { query: { type: "string" } },
            required: ["query"],
            additionalProperties: false
          }
        }
      ],
      messages: [
        { role: "user", content: "My headphones from order A1234 arrived yesterday." },
        { role: "assistant", content: "Thanks for confirming. How can I help with order A1234?" },
        { role: "user", content: "I opened the box. Can I still return them?" },
        // 该应用要求在给出任何政策
        // 答复之前先查询帮助中心。将此要求作为系统消息追加,可使
        // 之前的对话轮次保持不变。
        {
          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."
        }
      ]
    });
    
    console.log(response.content);

    C#

    AnthropicClient client = new();
    
    var parameters = new MessageCreateParams
    {
        Model = Model.ClaudeFable5_1,
        MaxTokens = 16000,
        System = "You are a customer support assistant for an online electronics store.",
        Tools = [
            new ToolUnion(new Tool()
            {
                Name = "search_help_center",
                Description = "Search the help center for policy and troubleshooting articles.",
                Strict = true,
                InputSchema = new InputSchema(new Dictionary<string, JsonElement>
                {
                    ["properties"] = JsonSerializer.SerializeToElement(new Dictionary<string, object>
                    {
                        ["query"] = new { type = "string" },
                    }),
                    ["required"] = JsonSerializer.SerializeToElement(new[] { "query" }),
                    ["additionalProperties"] = JsonSerializer.SerializeToElement(false),
                }),
            }),
        ],
        Messages = [
            new UserMessageParam { Content = "My headphones from order A1234 arrived yesterday." },
            new AssistantMessageParam { Content = "Thanks for confirming. How can I help with order A1234?" },
            new UserMessageParam { Content = "I opened the box. Can I still return them?" },
            // 应用程序要求在给出任何政策答复之前先查询帮助中心。
            // 将该要求作为系统消息追加,可使之前的
            // 对话轮次保持不变。
            new SystemMessageParam
            {
                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."
            }
        ]
    };
    
    var message = await client.Messages.Create(parameters);
    Console.WriteLine(message);

    Go

    client := anthropic.NewClient()
    
    response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
    	Model:     anthropic.ModelClaudeFable5_1,
    	MaxTokens: 16000,
    	System: []anthropic.TextBlockParam{
    		{Text: "You are a customer support assistant for an online electronics store."},
    	},
    	Tools: []anthropic.ToolUnionParam{
    		{OfTool: &anthropic.ToolParam{
    			Name:        "search_help_center",
    			Description: anthropic.String("Search the help center for policy and troubleshooting articles."),
    			Strict:      anthropic.Bool(true),
    			InputSchema: anthropic.ToolInputSchemaParam{
    				Properties: map[string]any{
    					"query": map[string]any{"type": "string"},
    				},
    				Required: []string{"query"},
    				ExtraFields: map[string]any{
    					"additionalProperties": false,
    				},
    			},
    		}},
    	},
    	Messages: []anthropic.MessageParam{
    		anthropic.NewUserMessage(anthropic.NewTextBlock("My headphones from order A1234 arrived yesterday.")),
    		anthropic.NewAssistantMessage(anthropic.NewTextBlock("Thanks for confirming. How can I help with order A1234?")),
    		anthropic.NewUserMessage(anthropic.NewTextBlock("I opened the box. Can I still return them?")),
    		// 该应用要求在给出任何政策回答之前先查询帮助中心。
    		// 将此要求作为系统消息追加,可使
    		// 之前的轮次保持不变。
    		{OfSystem: &anthropic.SystemMessageParam{
    			Content: []anthropic.TextBlockParam{
    				{Text: "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."},
    			},
    		}},
    	},
    })
    if err != nil {
    	log.Fatal(err)
    }
    fmt.Println(response.RawJSON())

    Java

    
    void main() {
        AnthropicClient client = AnthropicOkHttpClient.fromEnv();
    
        MessageCreateParams params = MessageCreateParams.builder()
            .model(Model.CLAUDE_FABLE_5_1)
            .maxTokens(16000L)
            .system("You are a customer support assistant for an online electronics store.")
            .addTool(Tool.builder()
                .name("search_help_center")
                .description("Search the help center for policy and troubleshooting articles.")
                .inputSchema(InputSchema.builder()
                    .properties(JsonValue.from(Map.of("query", Map.of("type", "string"))))
                    .putAdditionalProperty("required", JsonValue.from(List.of("query")))
                    .putAdditionalProperty("additionalProperties", JsonValue.from(false))
                    .build())
                .strict(true)
                .build())
            .addUserMessage("My headphones from order A1234 arrived yesterday.")
            .addAssistantMessage("Thanks for confirming. How can I help with order A1234?")
            .addUserMessage("I opened the box. Can I still return them?")
            // 该应用要求在给出任何政策
            // 答复前先查询帮助中心。将此要求作为系统消息追加,可使
            // 之前的对话轮次保持不变。
            .addSystemMessage("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.")
            .build();
    
        Message response = client.messages().create(params);
        IO.println(response);
    }

    PHP

    $client = new Client();
    
    $message = $client->messages->create(
        maxTokens: 16000,
        messages: [
            ['role' => 'user', 'content' => 'My headphones from order A1234 arrived yesterday.'],
            ['role' => 'assistant', 'content' => 'Thanks for confirming. How can I help with order A1234?'],
            ['role' => 'user', 'content' => 'I opened the box. Can I still return them?'],
            // 该应用要求在给出任何政策相关回答之前先查询帮助中心。
            // 将此要求作为系统消息追加,可使
            // 之前的轮次保持不变。
            ['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.']
        ],
        model: 'claude-fable-5-1',
        system: 'You are a customer support assistant for an online electronics store.',
        tools: [
            [
                'name' => 'search_help_center',
                'description' => 'Search the help center for policy and troubleshooting articles.',
                'strict' => true,
                'input_schema' => [
                    'type' => 'object',
                    'properties' => [
                        'query' => ['type' => 'string']
                    ],
                    'required' => ['query'],
                    'additionalProperties' => false
                ]
            ]
        ],
    );
    
    echo $message;

    Ruby

    client = Anthropic::Client.new
    
    message = client.messages.create(
      model: Anthropic::Model::CLAUDE_FABLE_5_1,
      max_tokens: 16000,
      system: "You are a customer support assistant for an online electronics store.",
      tools: [
        {
          name: "search_help_center",
          description: "Search the help center for policy and troubleshooting articles.",
          strict: true,
          input_schema: {
            type: "object",
            properties: { query: { type: "string" } },
            required: ["query"],
            additionalProperties: false
          }
        }
      ],
      messages: [
        { role: "user", content: "My headphones from order A1234 arrived yesterday." },
        { role: "assistant", content: "Thanks for confirming. How can I help with order A1234?" },
        { role: "user", content: "I opened the box. Can I still return them?" },
        # 该应用要求在回答任何政策问题之前先查询帮助中心。
        # 将此要求作为系统消息追加,可使
        # 之前的对话轮次保持不变。
        {
          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."
        }
      ]
    )
    puts message

    在后续请求中,像其他轮次一样将 role: "system" 消息保留在历史记录中。对话中系统消息不需要 beta 标头。对于不得调用工具的轮次,tool_choice: {"type": "none"} 仍然有效。

  2. 只有 Claude Fable 5.1 和 Claude Mythos 5.1 能读取 Claude Fable 5.1 的思考块: 每个 thinking 块都记录了生成它的模型。Claude Fable 5.1 可以读取自己的思考块,以及来自 Claude Mythos 5.1、Claude Opus 5、Claude Fable 5、Claude Mythos 5 和更早 Claude 模型的思考块。从这些模型中的任何一个切换到 claude-fable-5-1 的对话会保留其先前的推理。该条件是单向的:除 Claude Mythos 5.1 外,这些模型都无法读取 Claude Fable 5.1 的思考块。

    在 Claude Fable 5.1 上运行的对话可能会通过路由器切换、客户端重试或分类器拒绝回退(包括服务器端回退)转到另一个模型,无论更旧还是更新。API 会在目标模型接收之前移除其无法读取的思考块,请求会成功,并且您不会为被丢弃的输入令牌付费。目标模型会在没有该推理的情况下重新规划,这可能会增加切换后第一轮的成本和延迟。要查看丢弃了哪些内容,请发送 thinking-binding-controls-2026-08-01 beta 标头:响应随后会包含一个 input_transformations 数组,列出每个被丢弃的块,并带有 reason: "model_binding_mismatch"。请参阅在对话中途切换模型。

  3. 编辑较早的轮次会使思考块失效: 在 Claude Fable 5.1 和 Claude Mythos 5.1 上,您发回的思考块只有在其之前发送的所有内容(system 提示、tools 以及较早的消息)均保持不变时才有效。Claude Code、claude.ai、Claude Managed Agents 和 Claude Agent SDK 会为您保持该历史完整。如果您的代码自行构建 messages 数组,则此项适用于您,完整的集成指南请参阅保留思考。

    thinking.block_binding.prefix_mismatch_behavior 字段(beta 标头 thinking-binding-controls-2026-08-01)设置 API 如何处理无效的思考块。"error" 会以 400 错误拒绝请求。"drop_block" 会丢弃无效的块及其之后的所有思考块,并且请求会成功。当请求未设置该字段时,结果取决于模型以及您的账户创建时间:

    模型 于 2026 年 8 月 31 日或之后创建的账户 于 2026 年 8 月 31 日之前创建的账户
    Claude Fable 5.1 400 错误 无错误(失效的块会到达模型)
    Claude Mythos 5.1 400 错误 400 错误

    要在您自己的账户中看到 400 错误,请在测试请求中将该字段设置为 "error"。在发布供他人使用其自己的 API 密钥运行的工具之前,请务必这样做:他们的账户可能会收到 400 错误,而您的账户却不会。包含适用平台的完整表格,请参阅未设置 prefix_mismatch_behavior 时。

    400 错误如下所示:

    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.

    每次请求发送无效块时都会返回该错误,因此重试循环无法消除它。要在没有失效推理的情况下继续,请移除错误中指明的块以及之后的所有 thinking 和 redacted_thinking 块,然后重试一次。或者,发送 thinking-binding-controls-2026-08-01 beta 标头,并在对话中之后的每个请求上将 prefix_mismatch_behavior 设置为 "drop_block"。响应随后会在其 input_transformations 数组中报告每个被丢弃的块,并附带 reason: "prefix_binding_mismatch":

    cURL

    curl https://api.anthropic.com/v1/messages \
      -H "x-api-key: $ANTHROPIC_API_KEY" \
      -H "anthropic-version: 2023-06-01" \
      -H "anthropic-beta: thinking-binding-controls-2026-08-01" \
      -H "content-type: application/json" \
      -d '{
        "model": "claude-fable-5-1",
        "max_tokens": 16000,
        "thinking": {
          "type": "adaptive",
          "block_binding": {
            "prefix_mismatch_behavior": "drop_block"
          }
        },
        "messages": [
          {
            "role": "user",
            "content": "What is the greatest common divisor of 1071 and 462?"
          }
        ]
      }'

    CLI

    ant beta:messages create --beta thinking-binding-controls-2026-08-01 <<'YAML'
    model: claude-fable-5-1
    max_tokens: 16000
    thinking:
      type: adaptive
      block_binding:
        prefix_mismatch_behavior: drop_block
    messages:
      - role: user
        content: What is the greatest common divisor of 1071 and 462?
    YAML

    Python

    client = anthropic.Anthropic()
    
    response = client.beta.messages.create(
        model="claude-fable-5-1",
        max_tokens=16000,
        thinking={
            "type": "adaptive",
            "block_binding": {"prefix_mismatch_behavior": "drop_block"},
        },
        messages=[
            {
                "role": "user",
                "content": "What is the greatest common divisor of 1071 and 462?",
            }
        ],
        betas=["thinking-binding-controls-2026-08-01"],
    )
    
    for block in response.content:
        if block.type == "text":
            print(block.text)
    
    print(f"Input transformations: {len(response.input_transformations or [])}")

    TypeScript

    const client = new Anthropic();
    
    const response = await client.beta.messages.create({
      model: "claude-fable-5-1",
      max_tokens: 16000,
      thinking: {
        type: "adaptive",
        block_binding: { prefix_mismatch_behavior: "drop_block" }
      },
      messages: [
        { role: "user", content: "What is the greatest common divisor of 1071 and 462?" }
      ],
      betas: ["thinking-binding-controls-2026-08-01"]
    });
    
    for (const block of response.content) {
      if (block.type === "text") {
        console.log(block.text);
      }
    }
    console.log(`Input transformations: ${response.input_transformations?.length ?? 0}`);

    C#

    using Anthropic.Models.Beta;
    using Anthropic.Models.Beta.Messages;
    using Model = Anthropic.Models.Messages.Model;
    
    AnthropicClient client = new();
    
    var response = await client.Beta.Messages.Create(
        new()
        {
            Model = Model.ClaudeFable5_1,
            MaxTokens = 16000,
            Thinking = new BetaThinkingConfigAdaptive
            {
                BlockBinding = new()
                {
                    PrefixMismatchBehavior = BetaThinkingPrefixMismatchBehavior.DropBlock,
                },
            },
            Messages =
            [
                new BetaUserMessageParam
                {
                    Content = "What is the greatest common divisor of 1071 and 462?",
                },
            ],
            Betas = [AnthropicBeta.ThinkingBindingControls2026_08_01],
        }
    );
    
    foreach (var block in response.Content)
    {
        if (block.TryPickText(out var textBlock))
        {
            Console.WriteLine(textBlock.Text);
        }
    }
    
    Console.WriteLine($"Input transformations: {response.InputTransformations?.Count ?? 0}");

    Go

    client := anthropic.NewClient()
    
    response, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{
    	Model:     anthropic.ModelClaudeFable5_1,
    	MaxTokens: 16000,
    	Thinking: anthropic.BetaThinkingConfigParamUnion{
    		OfAdaptive: &anthropic.BetaThinkingConfigAdaptiveParam{
    			BlockBinding: anthropic.BetaThinkingBlockBindingParam{
    				PrefixMismatchBehavior: anthropic.BetaThinkingPrefixMismatchBehaviorDropBlock,
    			},
    		},
    	},
    	Messages: []anthropic.BetaMessageParam{
    		anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("What is the greatest common divisor of 1071 and 462?")),
    	},
    	Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaThinkingBindingControls2026_08_01},
    })
    if err != nil {
    	log.Fatal(err)
    }
    
    for _, block := range response.Content {
    	if textBlock, ok := block.AsAny().(anthropic.BetaTextBlock); ok {
    		fmt.Println(textBlock.Text)
    	}
    }
    fmt.Printf("Input transformations: %d\n", len(response.InputTransformations))

    Java

    import com.anthropic.models.beta.AnthropicBeta;
    import com.anthropic.models.beta.messages.BetaMessage;
    import com.anthropic.models.beta.messages.BetaThinkingBlockBinding;
    import com.anthropic.models.beta.messages.BetaThinkingConfigAdaptive;
    import com.anthropic.models.beta.messages.BetaThinkingPrefixMismatchBehavior;
    import com.anthropic.models.beta.messages.MessageCreateParams;
    import com.anthropic.models.messages.Model;
    
    void main() {
        AnthropicClient client = AnthropicOkHttpClient.fromEnv();
    
        MessageCreateParams params = MessageCreateParams.builder()
            .model(Model.CLAUDE_FABLE_5_1)
            .maxTokens(16000L)
            .addBeta(AnthropicBeta.THINKING_BINDING_CONTROLS_2026_08_01)
            .thinking(BetaThinkingConfigAdaptive.builder()
                .blockBinding(BetaThinkingBlockBinding.builder()
                    .prefixMismatchBehavior(BetaThinkingPrefixMismatchBehavior.DROP_BLOCK)
                    .build())
                .build())
            .addUserMessage("What is the greatest common divisor of 1071 and 462?")
            .build();
    
        BetaMessage response = client.beta().messages().create(params);
    
        response.content().stream()
            .flatMap(block -> block.text().stream())
            .forEach(textBlock -> IO.println(textBlock.text()));
        IO.println("Input transformations: "
            + response.inputTransformations().map(List::size).orElse(0));
    }

    PHP

    use Anthropic\Beta\AnthropicBeta;
    use Anthropic\Beta\Messages\BetaThinkingBlockBinding;
    use Anthropic\Beta\Messages\BetaThinkingConfigAdaptive;
    use Anthropic\Beta\Messages\BetaThinkingPrefixMismatchBehavior;
    use Anthropic\Client;
    
    $client = new Client();
    
    $response = $client->beta->messages->create(
        model: 'claude-fable-5-1',
        maxTokens: 16000,
        thinking: BetaThinkingConfigAdaptive::with(
            blockBinding: BetaThinkingBlockBinding::with(
                prefixMismatchBehavior: BetaThinkingPrefixMismatchBehavior::DROP_BLOCK,
            ),
        ),
        messages: [
            ['role' => 'user', 'content' => 'What is the greatest common divisor of 1071 and 462?'],
        ],
        betas: [AnthropicBeta::THINKING_BINDING_CONTROLS_2026_08_01],
    );
    
    foreach ($response->content as $block) {
        if ($block->type === 'text') {
            echo $block->text, PHP_EOL;
        }
    }
    
    echo 'Input transformations: ', count($response->inputTransformations ?? []), PHP_EOL;

    Ruby

    client = Anthropic::Client.new
    
    response = client.beta.messages.create(
      model: Anthropic::Model::CLAUDE_FABLE_5_1,
      max_tokens: 16_000,
      thinking: {
        type: "adaptive",
        block_binding: {prefix_mismatch_behavior: "drop_block"}
      },
      messages: [
        {role: "user", content: "What is the greatest common divisor of 1071 and 462?"}
      ],
      betas: [Anthropic::AnthropicBeta::THINKING_BINDING_CONTROLS_2026_08_01]
    )
    
    response.content.each do |block|
      puts block.text if block.type == :text
    end
    
    puts "Input transformations: #{response.input_transformations&.length || 0}"

    令牌计数端点会执行相同的检查。有关响应结构以及在流式传输中的位置,请参阅设置不匹配行为并读取 input_transformations。

    会使后续思考块失效的模式,以及替代做法:

    • 编辑、重新排序或删除较早的轮次。这包括删除旧的工具结果、从对话记录中间剪掉轮次,以及在摘要之后逐字保留最近轮次及其思考块的客户端压缩(包括在几个轮次之后才换入摘要的后台压缩)。请改用服务器端压缩或上下文编辑(对于旧工具结果,使用工具结果清除),或者使用在服务器端修剪上下文,或以不携带过时思考的结构进行压缩下列出的某种客户端压缩结构。
    • 注入您不持久保存的内容,例如在 tool_result 块之后追加、并在下一个请求中删除的每轮提醒。请改为将该提醒作为轮次范围的系统消息发送,并将其保留在历史中。
    • 在同一对话的请求之间重建顶层 system 提示或 tools 数组,例如为了更新当前日期或添加、删除工具。请改为追加一条携带新指令(“The current date is 2026-09-14.”)或 tool_addition 和 tool_removal 块的对话中系统消息。开始时未在 tools 中声明的工具可以在 tool_addition 块中定义(beta 标头 inline-tools-2026-09-15)。
    • 在后续请求中提供不同字节内容的图像或文档 URL。前缀检查针对的是字节内容,而不是 URL 字符串,因此对同一文件使用轮换的签名 URL 是没有问题的。对于跨轮次引用的内容,请使用 Files API 上传一次并发送 file_id,或者发送 base64。

    每种替代做法还能使先前的轮次保持字节级一致,并保留编辑历史、system 提示或 tools 数组时会丢失的提示缓存命中。

    继续有效的模式:

    • 仅追加的历史:添加轮次,并将先前的轮次按发送和接收时的原样传回,包括追加的 role: "system" 消息。
    • 移除最旧的思考块(从历史开头)、最新的思考块(从末尾),或全部思考块。
    • 更改 effort、max_tokens 或 model、system、tools 和 messages 之外的任何其他请求参数,以及添加或移动 cache_control 标记。
    • 服务器端压缩和上下文编辑,包括思考块清除。它们不算作编辑,因为检查比较的是您发送的对话。

    要检查现有集成:

    1. 在几个正常轮次中捕获它发送的确切请求体,如果您的产品有压缩或工具变更,也要包括在内。对于每对连续请求,比较 system 提示、tools 数组以及 messages 的共享前缀。除新追加的轮次外,它们应该字节级一致。一个预期的例外是替换入来自按需压缩的签名 compaction 块的请求:该块会替换 messages 开头被其总结的消息,之后的所有内容仍应匹配。
    2. 使用 thinking-binding-controls-2026-08-01 beta 标头和 prefix_mismatch_behavior: "drop_block",针对 claude-fable-5-1 运行一次正常的多轮会话。在每个响应上记录 input_transformations。在响应包含思考块的会话中,如果每一轮都是空数组,则表示历史是完整的。带有 reason: "prefix_binding_mismatch" 的条目表示,自 path 处的块生成以来,该块之前的某些内容发生了变化。带有 reason: "model_binding_mismatch" 的条目表示对话切换了模型,这不是您代码中的错误。由于每个请求都设置了该字段,此测试在任何账户下都有效。在 CI 中,请改为设置 "error",以便编辑会导致运行失败。
    3. 选择一个生产环境设置,并在每个请求上发送。如果前缀不匹配只可能意味着您代码中的错误,请使用 "error"。如果您宁愿丢弃受影响的块也不希望请求失败,请使用 "drop_block"。无论哪种方式,都请监控 400 错误或 input_transformations 条目。

    偶尔丢弃一次思考块(例如在压缩边界处)影响很小。每个请求都使先前思考失效的集成每次都会重新开始提示缓存,这可能会增加每个任务的成本(请参阅保持对话历史仅追加)。

  4. Advisor 工具接受的顾问更少: 使用 Advisor 工具(beta)时,顾问的能力必须至少与执行者相当。当执行者为 claude-fable-5-1 时,能力较弱的顾问(例如 claude-fable-5 或 claude-opus-5-5)会返回 400 invalid_request_error。请选择模型兼容性中为该执行者列出的顾问。

行为变更

  1. 长智能体循环中的并行工具调用更少: 在长时间运行的循环中,如果接下来的独立读取操作只是由任务隐含的(自定义编码智能体、bash 和编辑器框架、计算机使用),Claude Fable 5.1 可能每轮只发出一个工具调用。每个额外的轮次都会消耗令牌、一次往返和实际时间。请在每条用户消息之后,以轮次范围的系统消息(clear_at: "next_user_message",beta)的形式追加一句批处理指令;或者不使用 beta,将其放在 tool_result 块之后的文本块中,并在后续请求中将先前的副本保留在历史中。请参阅在智能体循环中批量处理独立工具调用。

  2. 工具调用之间的进度消息更少: 在长工具序列中,Claude Fable 5.1 编写的状态更新比 Claude Fable 5 少,其智能体编码摘要也更短。如果您的界面会呈现这些更新,请将 thinking.display 设置为 "updates"(beta)或 "summarized",并明确提示要求这些更新。请参阅工具调用之间的进度更新和请求面向用户的进度更新。

  3. 低 effort 下的搜索和检索调用更少: 在 low effort 下,与 Claude Fable 5 相比,Claude Fable 5.1 更常凭记忆回答,而不是调用搜索或检索工具。如果您的产品在低 effort 下依赖检索,请为这些请求提高 effort,或告诉模型何时进行搜索。请参阅低 effort 下的搜索触发。

有关散文密度、聊天格式、摘要中的引用以及文件编辑方面的差异(这些不影响 API 集成),请参阅相较 Claude Fable 5 的变化。

推荐的变更

这些变更不是必需的,但每一项都能降低成本或延迟,或消除一种故障模式:

  1. 在对话中途更改 effort(beta): 在 Claude Fable 5 上,output_config.effort 是请求级别的,在请求之间更改它会丢弃先前轮次的缓存前缀。在 claude-fable-5-1 上,仅携带 output_config 的 role: "system" 消息可以为困难步骤提高 effort,或为常规步骤降低 effort,而不会使提示缓存失效:

    cURL

    # 仅 effort 的系统消息:新级别从下一个用户轮次开始生效。
    curl https://api.anthropic.com/v1/messages \
      -H "x-api-key: $ANTHROPIC_API_KEY" \
      -H "anthropic-version: 2023-06-01" \
      -H "anthropic-beta: mid-conversation-output-config-2026-07-01" \
      -H "content-type: application/json" \
      -d '{
        "model": "claude-fable-5-1",
        "max_tokens": 4096,
        "output_config": {"effort": "high"},
        "messages": [
          {"role": "user", "content": "Plan a migration from SQLite to PostgreSQL in three short steps."},
          {"role": "assistant", "content": "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."},
          {"role": "system", "content": [], "output_config": {"effort": "low"}},
          {"role": "user", "content": "Summarize the plan in one sentence."}
        ]
      }'

    CLI

    ant beta:messages create \
      --beta mid-conversation-output-config-2026-07-01 <<'YAML'
    model: claude-fable-5-1
    max_tokens: 4096
    output_config:
      effort: high
    messages:
      - role: user
        content: Plan a migration from SQLite to PostgreSQL in three short steps.
      - role: assistant
        content: "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."
      # 仅含 effort 的系统消息:新级别从下一个用户轮次开始生效。
      - role: system
        content: []
        output_config:
          effort: low
      - role: user
        content: Summarize the plan in one sentence.
    YAML

    Python

    client = anthropic.Anthropic()
    
    response = client.beta.messages.create(
        model="claude-fable-5-1",
        max_tokens=4096,
        output_config={"effort": "high"},
        messages=[
            {
                "role": "user",
                "content": "Plan a migration from SQLite to PostgreSQL in three short steps.",
            },
            {
                "role": "assistant",
                "content": "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.",
            },
            # 仅含 effort 的系统消息:新级别从下一个用户轮次起生效。
            {"role": "system", "content": [], "output_config": {"effort": "low"}},
            {"role": "user", "content": "Summarize the plan in one sentence."},
        ],
        betas=["mid-conversation-output-config-2026-07-01"],
    )
    
    for block in response.content:
        if block.type == "text":
            print(block.text)

    TypeScript

    const client = new Anthropic();
    
    const response = await client.beta.messages.create({
      model: "claude-fable-5-1",
      max_tokens: 4096,
      output_config: { effort: "high" },
      messages: [
        {
          role: "user",
          content: "Plan a migration from SQLite to PostgreSQL in three short steps."
        },
        {
          role: "assistant",
          content:
            "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."
        },
        // 仅含 effort 的系统消息:新级别从下一个用户轮次起生效。
        { role: "system", content: [], output_config: { effort: "low" } },
        { role: "user", content: "Summarize the plan in one sentence." }
      ],
      betas: ["mid-conversation-output-config-2026-07-01"]
    });
    
    for (const block of response.content) {
      if (block.type === "text") {
        console.log(block.text);
      }
    }

    C#

    using Anthropic.Models.Beta;
    using Anthropic.Models.Beta.Messages;
    using Model = Anthropic.Models.Messages.Model;
    
    AnthropicClient client = new();
    
    var response = await client.Beta.Messages.Create(new MessageCreateParams
    {
        Model = Model.ClaudeFable5_1,
        MaxTokens = 4096,
        OutputConfig = new() { Effort = Effort.High },
        Messages =
        [
            new BetaUserMessageParam { Content = "Plan a migration from SQLite to PostgreSQL in three short steps." },
            new BetaAssistantMessageParam { Content = "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts." },
            // 仅含 effort 的系统消息:新级别将从下一个用户轮次起生效。
            new BetaSystemMessageParam
            {
                Content = new([]),
                OutputConfig = new() { Effort = BetaSystemMessageOutputConfigEffort.Low },
            },
            new BetaUserMessageParam { Content = "Summarize the plan in one sentence." },
        ],
        Betas = [AnthropicBeta.MidConversationOutputConfig2026_07_01],
    });
    
    foreach (var block in response.Content)
    {
        if (block.TryPickText(out var textBlock))
        {
            Console.WriteLine(textBlock.Text);
        }
    }

    Go

    client := anthropic.NewClient()
    
    response, err := client.Beta.Messages.New(context.Background(), anthropic.BetaMessageNewParams{
    	Model:     anthropic.ModelClaudeFable5_1,
    	MaxTokens: 4096,
    	OutputConfig: anthropic.BetaOutputConfigParam{
    		Effort: anthropic.BetaOutputConfigEffortHigh,
    	},
    	Messages: []anthropic.BetaMessageParam{
    		anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Plan a migration from SQLite to PostgreSQL in three short steps.")),
    		{OfAssistant: &anthropic.BetaAssistantMessageParam{
    			Content: []anthropic.BetaContentBlockParamUnion{anthropic.NewBetaTextBlock("1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.")},
    		}},
    		// 仅含 effort 的系统消息:新级别从下一个用户轮次开始生效。
    		anthropic.NewBetaSystemMessage(anthropic.BetaSystemMessageOutputConfigParam{
    			Effort: anthropic.BetaSystemMessageOutputConfigEffortLow,
    		}),
    		anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Summarize the plan in one sentence.")),
    	},
    	Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaMidConversationOutputConfig2026_07_01},
    })
    if err != nil {
    	log.Fatal(err)
    }
    
    for _, block := range response.Content {
    	if textBlock, ok := block.AsAny().(anthropic.BetaTextBlock); ok {
    		fmt.Println(textBlock.Text)
    	}
    }

    Java

    import com.anthropic.models.beta.AnthropicBeta;
    import com.anthropic.models.beta.messages.BetaMessage;
    import com.anthropic.models.beta.messages.BetaOutputConfig;
    import com.anthropic.models.beta.messages.BetaSystemMessageOutputConfig;
    import com.anthropic.models.beta.messages.BetaSystemMessageParam;
    import com.anthropic.models.beta.messages.MessageCreateParams;
    import com.anthropic.models.messages.Model;
    
    void main() {
        AnthropicClient client = AnthropicOkHttpClient.fromEnv();
    
        MessageCreateParams params = MessageCreateParams.builder()
            .model(Model.CLAUDE_FABLE_5_1)
            .maxTokens(4096L)
            .addBeta(AnthropicBeta.MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01)
            .outputConfig(BetaOutputConfig.builder()
                .effort(BetaOutputConfig.Effort.HIGH)
                .build())
            .addUserMessage("Plan a migration from SQLite to PostgreSQL in three short steps.")
            .addAssistantMessage("1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.")
            // 仅调整 effort 的系统消息:新级别从下一个用户轮次起生效。
            .addMessage(BetaSystemMessageParam.builder()
                .contentOfBlocks(List.of())
                .outputConfig(BetaSystemMessageOutputConfig.builder()
                    .effort(BetaSystemMessageOutputConfig.Effort.LOW)
                    .build())
                .build())
            .addUserMessage("Summarize the plan in one sentence.")
            .build();
    
        BetaMessage response = client.beta().messages().create(params);
        response.content().stream()
            .flatMap(block -> block.text().stream())
            .forEach(textBlock -> IO.println(textBlock.text()));
    }

    PHP

    use Anthropic\Beta\AnthropicBeta;
    use Anthropic\Beta\Messages\BetaMessageParam;
    use Anthropic\Beta\Messages\BetaOutputConfig;
    use Anthropic\Beta\Messages\BetaSystemMessageOutputConfig;
    use Anthropic\Client;
    
    $client = new Client();
    
    $response = $client->beta->messages->create(
        model: 'claude-fable-5-1',
        maxTokens: 4096,
        outputConfig: BetaOutputConfig::with(effort: 'high'),
        messages: [
            BetaMessageParam::with(role: 'user', content: 'Plan a migration from SQLite to PostgreSQL in three short steps.'),
            BetaMessageParam::with(role: 'assistant', content: '1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.'),
            // 仅含 effort 的系统消息:新级别从下一个用户轮次起生效。
            BetaMessageParam::with(
                role: 'system',
                content: [],
                outputConfig: BetaSystemMessageOutputConfig::with(effort: 'low'),
            ),
            BetaMessageParam::with(role: 'user', content: 'Summarize the plan in one sentence.'),
        ],
        betas: [AnthropicBeta::MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01],
    );
    
    foreach ($response->content as $block) {
        if ($block->type === 'text') {
            echo $block->text, PHP_EOL;
        }
    }

    Ruby

    client = Anthropic::Client.new
    
    response = client.beta.messages.create(
      model: Anthropic::Model::CLAUDE_FABLE_5_1,
      max_tokens: 4096,
      output_config: {effort: :high},
      messages: [
        {role: "user", content: "Plan a migration from SQLite to PostgreSQL in three short steps."},
        {role: "assistant", content: "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."},
        # 仅含 effort 的系统消息:新级别从下一个用户轮次起生效。
        {role: "system", content: [], output_config: {effort: :low}},
        {role: "user", content: "Summarize the plan in one sentence."}
      ],
      betas: [Anthropic::AnthropicBeta::MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01]
    )
    
    response.content.each do |block|
      puts block.text if block.type == :text
    end

    像这里一样放在 assistant 轮次和下一个 user 轮次之间时,该消息从那个 user 轮次开始生效。紧接在带有新输入的 user 轮次之后放置时,它会设置 Claude 对该轮次回复的级别。仅包含工具结果的 user 轮次不算作新输入:更改会等到下一个带有新输入的 user 轮次。之后该级别一直保持,直到另一条 role: "system" 消息更改它。只接受命名级别(low、medium、high、xhigh、max),并且需要 mid-conversation-output-config-2026-07-01 beta 标头。请参阅按消息设置 effort。

  2. 使用对话中系统消息更改指令和工具: 要在会话中途更改指令或工具,请追加一条 role: "system" 消息,工具变更使用 tool_addition 和 tool_removal 块(在 Claude API 上使用 beta 标头 inline-tools-2026-09-15)。tool_addition 块可以指明会话开始时在 tools 中声明的工具,也可以携带工具的完整定义,因此会话开始时未知的工具不需要出现在 tools 中。这样可以保留先前轮次的提示缓存命中,并保持对话历史仅追加。较旧的 mid-conversation-tool-changes-2026-07-01 标头对于按引用指明工具的变更仍然有效,适用于 Claude API、Amazon Bedrock 和 Claude Models on Google Cloud (Google managed)。当当前轮次必须运行特定工具时,同样的消息可以替代强制 tool_choice(请参阅破坏性变更)。对于仅适用于单个轮次的提醒,请将其作为带有 clear_at: "next_user_message" 的单独纯文本 role: "system" 消息发送(轮次范围的系统消息,beta 标头 mid-conversation-system-clear-at-2026-08-21),并将其保留在历史中:它在下一条用户消息之后停止呈现,清除后不消耗任何令牌。携带 tool_addition 或 tool_removal 块的消息不能设为轮次范围。

  3. 对拒绝使用 fallbacks: "default": 继续处理 stop_reason: "refusal",并在读取响应内容之前读取 stop_details.category。要自动在另一个模型上重新运行被拒绝的请求,请设置 fallbacks: "default"(beta,server-side-fallback-2026-07-01 标头)。"default" 会在 Anthropic 为该类别推荐的模型上重试被拒绝的请求。Claude Fable 5.1 允许的回退目标是 Claude Opus 4.8(claude-opus-4-8)和 Claude Opus 5(claude-opus-5)。显式的 fallbacks 列表可以指定其中任何一个。回退模型不会接收 Claude Fable 5.1 的思考块。fallbacks 参数在 Amazon Bedrock、Claude Models on Google Cloud (Google managed) 或 Microsoft Foundry 上不可用。在这些平台上,请改用客户端回退。如果您自行构建重试,回退抵免按与 Claude Fable 5 相同的条款适用。请参阅拒绝与回退。

  4. 从 high effort 开始并进行扫描测试: effort 参数的默认值为 high,并支持全部五个级别。沿用 Claude Fable 5 的指导:大多数工作使用 high,medium 作为值得测试的成本控制手段。Claude Fable 5.1 相较 Claude Fable 5 的提升在 xhigh 和 max 下最大,但这些级别也会增加思考时间和首次响应时间,因此请在对能力最敏感的任务上、以及在您的评估显示有提升时再升级到这些级别。请在您自己的评估上重新进行一次扫描测试,而不是沿用为 Claude Fable 5 调整的设置。请参阅Claude Fable 5.1 的推荐 effort 级别。

  5. 在服务器端修剪上下文,或以不携带过时思考的结构进行压缩: 如果您的代码在客户端截断或总结较早的轮次,最简单的解决方法是将该工作移到服务器端压缩或上下文编辑。两者都不算作编辑:前缀检查比较的是您所发送的对话,因此它们移除的任何内容都不会使后续思考块失效。压缩的 instructions 参数也接受您自己的总结提示。如果您在摘要之后逐字保留最近的轮次,或在对话继续进行时于后台进行总结,请使用按需压缩(beta 标头 compact-2026-09-04),而不是客户端编写的摘要。API 会写入一个已签名的摘要块,您将其放在它所总结的消息的位置。您保留的轮次中的思考块可以保持有效,具体条件请参阅压缩与保留思考。如果您在客户端进行压缩,请从以下三种结构中选择一种:

    • 简单压缩(推荐): 用一条摘要消息加上新的用户轮次替换整个历史,不重放其他任何内容。不会携带任何思考块,因此不会失败。Claude 模型是在采用这种方案的长时程任务上训练的,对于大多数工作负载,其性能与更复杂的方案相当。
    • 保留尾部的压缩: 如果您在摘要之后逐字保留最近的轮次,请从这些轮次中删除 thinking 和 redacted_thinking 块(文本和工具调用可以保留),或设置 prefix_mismatch_behavior: "drop_block"。它们的思考是针对完整历史生成的,否则放在摘要之后会失败。
    • 后台压缩: 如果您在关键路径之外构建摘要并在稍后替换进去,那么在此期间生成的每个轮次都带有早于替换的思考。请在每个仍携带替换前生成的思考块的请求上发送 "drop_block"(或自行删除这些块;替换后第一个响应中的 input_transformations 会准确列出是哪些块),或者同步进行压缩。

    不要从记录中间剪掉单个轮次:这会使之后的每个思考块失效,任何客户端结构都无法避免。对于您想要进行的指令更改,请使用对话中系统消息;对于选择性删除,请使用服务器端上下文编辑。请参阅传回压缩块。

迁移清单

  • 将模型名称从 claude-fable-5 更新为 claude-fable-5-1(或从 claude-mythos-5 更新为 claude-mythos-5-1)。
  • 替换强制 tool_choice({type: "any"} 或 {type: "tool", ...}):设置了它的请求会收到 400 错误。请使用 {type: "auto"} 搭配明确的指令和 strict: true 工具,或使用 JSON 输出。当您的应用程序要求进行该调用时,请将指令放在 user 轮次中或对话中途的 role: "system" 消息中。
  • 如果您使用 Advisor 工具(beta),也请更新顾问的 model。能力弱于 Claude Fable 5.1 的顾问(例如 claude-fable-5 或 claude-opus-5-5)会返回 400 错误。
  • 继续在每个轮次中原样传回 thinking 块,包括空的思考块。Claude Fable 5.1 和 Claude Mythos 5.1 可以读取来自 Claude Opus 5、Claude Fable 5、Claude Mythos 5 及更早模型的思考块。将对话从 Claude Fable 5.1 迁移到 Claude Mythos 5.1 以外的任何模型都会丢弃其思考块。
  • 如果您的代码自行构建 messages 数组,请检查它是否编辑先前的轮次:使用 thinking-binding-controls-2026-08-01 beta 标头和 prefix_mismatch_behavior: "drop_block" 运行一个会话,记录 input_transformations,并修复每个 prefix_binding_mismatch。模型切换后出现 model_binding_mismatch 条目是预期行为。
  • 保持对话历史仅追加。在会话开始时固定 system 和 tools,并将会话中途的更改移到 role: "system" 消息以及 tool_addition / tool_removal 块中。将逐轮提醒作为永不移除的轮次范围系统消息发送。在服务器端修剪上下文,或从您跨客户端摘要保留的任何轮次中移除思考块。通过 file_id 引用跨轮次的文件。
  • 在每个生产请求上设置 prefix_mismatch_behavior。"error" 会使发回无效思考块的请求失败。"drop_block" 会丢弃无效的块并让请求成功。监控 400 错误或 input_transformations 条目。
  • 检查智能体循环是否存在每轮一个工具调用的行为,并添加批处理指令。
  • 如果您的界面会在工具调用之间呈现进度文本,请将 thinking.display 设置为 "updates"(beta)或 "summarized",并提示要求更新。
  • 如果您在请求之间更改 effort,请将该更改转移到按消息设置 effort 的 role: "system" 消息(beta)中,以保留缓存命中。
  • 处理 stop_reason: "refusal" 并读取 stop_details.category。考虑使用 fallbacks: "default"(beta)。
  • 从 high 开始,通过新的扫描测试重新评估 effort,并在您自己的工作负载上重新确定成本和延迟基线。分词器未变。提示缓存读取成本为 Claude Fable 5 费率的四分之一。
  • 如果您为当前模型有 Priority Tier 承诺,它不涵盖 Claude Fable 5.1,因为后者不支持 Priority Tier。

从 Claude Opus 5 迁移到 Claude Fable 5.1

Claude Fable 5.1 使用与 Claude Opus 5 相同的 Messages API 和工具使用模式。它默认保留 1M 令牌上下文窗口、128k 最大输出令牌、512 令牌的提示缓存最小值,以及对对话中系统消息的支持。预填充限制、采样参数限制以及 thinking.display 的 "omitted" 默认值也同样沿用。请应用从 Claude Fable 5 迁移到 Claude Fable 5.1 中的所有内容,以及以下内容。

更新您的模型名称

model = "claude-opus-5"  # Before
model = "claude-fable-5-1"  # After

# 或者,对于面向经过验证的组织提供相同功能的 Claude Mythos 5.1:
model = "claude-mythos-5-1"  # After

变更内容

  1. 无法禁用思考: Claude Opus 5 在 effort 级别为 high 或更低时接受 thinking: {type: "disabled"}。在 claude-fable-5-1 和 claude-mythos-5-1 上,自适应思考始终开启,并且 thinking: {type: "disabled"} 在任何 effort 级别下都会返回 400 错误。请移除该字段,使用较低的 effort 级别控制令牌消耗,并为原先在禁用思考的情况下运行的工作负载重新审视 max_tokens。这些工作负载的响应可能以 thinking 块开头,因此请按 type 而不是按位置选择内容块。

  2. 不支持强制工具选择: Claude Opus 5 接受 tool_choice 的 any 和 tool。claude-fable-5-1 和 claude-mythos-5-1 会返回 400 错误。请参阅破坏性变更。

  3. 跨模型保留思考: Claude Fable 5.1 和 Claude Mythos 5.1 可以读取 Claude Opus 5 的思考块:从 claude-opus-5 迁移到 claude-fable-5-1 或 claude-mythos-5-1 的对话会保留其推理。Claude Opus 5 无法读取这两个模型中任何一个的思考块。请参阅破坏性变更。

  4. 编辑较早的轮次会使思考块失效: Claude Opus 5 不执行前缀检查。在 claude-fable-5-1 和 claude-mythos-5-1 上,在请求之间编辑较早的消息、重建 system 或 tools,或在客户端进行压缩,都会使之后的每个思考块失效。在切换流量之前,请运行 Claude Fable 5 部分中的三步检查。

  5. 工具调用之间的文本在思考块中返回: 在 Claude Opus 5 上,模型在工具调用之间编写的文本以 text 块返回。在 claude-fable-5-1 上,与 Claude Fable 5 一样,该叙述以进度更新 thinking 块的形式返回,每次工具调用之前一个。在默认的 thinking.display 值 "omitted" 下,它们不包含可读文本。如果您的界面需要渲染该叙述,请将 thinking.display 设置为 "updates"(beta)以文本形式接收进度更新,同时保持推理隐藏;或设置为 "summarized" 以同时接收两者。然后渲染 tool_use 块之间的非空 thinking 块。请参阅工具调用之间的进度更新。

  6. 安全分类器和回退路由: Claude Fable 5.1 运行的安全分类器覆盖与 Claude Fable 5 相同的 stop_details 类别,比 Claude Opus 5 的分类器覆盖范围更广。预计会出现额外的 stop_details.category 值,例如 "bio";完整列表请参阅拒绝类别表。有关 fallbacks 配置和允许的目标,请参阅对拒绝使用 fallbacks: "default"。

  7. 定价: 每百万输入令牌 10 美元,每百万输出令牌 50 美元,而 Claude Opus 5 分别为 5 美元和 25 美元。提示缓存读取为每百万令牌 0.25 美元,是 Claude Opus 5 费率的一半。请参阅 Claude 定价。

  8. 数据保留: Claude Fable 5.1 和 Claude Mythos 5.1 要求 30 天数据保留,除非获得 Anthropic 明确授权,否则不适用于零数据保留(ZDR)安排,并且被指定为受管辖模型(Covered Models)。Claude Opus 5 可在 ZDR 下使用。请参阅特定模型的数据保留要求。

迁移清单

  • 如果您的组织有零数据保留(ZDR)安排,请先确认资格:除非获得 Anthropic 明确授权,否则这些模型不适用于 ZDR。请参阅特定模型的数据保留要求。
  • 将模型名称从 claude-opus-5 更新为 claude-fable-5-1(或 claude-mythos-5-1)。
  • 移除所有 thinking: {type: "disabled"} 配置:它在 claude-fable-5-1 上会返回 400 错误。使用较低的 effort 级别控制令牌消耗,并重新评估 max_tokens。
  • 如果您移除了 thinking: {type: "disabled"},请更新按位置读取内容的响应解析逻辑(例如 content[0].text):响应可能以 thinking 块开头,因此请改为按 type 选择内容块。
  • 将强制 tool_choice(any 或 tool)替换为 auto 加上明确指令(user 轮次或对话中途的系统消息)和 strict: true 工具,或替换为 JSON 输出。
  • 如果您的界面需要呈现工具调用之间的文本,请设置 display: "updates"(beta)或 "summarized",并呈现非空的 thinking 块。
  • 应用 Claude Fable 5 检查清单中关于顾问、保留思考、仅追加、行为、effort 和回退的各项。
  • 在您自己的工作负载上重新建立成本基线。分词器没有变化。每令牌定价有所不同。

从 Claude Opus 4.8 或更早版本迁移到 Claude Fable 5.1

请逐项完成以下清单。如果您使用的是 Claude Opus 4.7 或更早版本,请先参阅相应的 Claude Opus 5.5 迁移指南部分。

更新模型名称

model = "claude-opus-4-8"  # Before
model = "claude-fable-5-1"  # After

# 或者,对于 Claude Mythos 5.1(它为经过验证的组织提供相同的功能):
model = "claude-mythos-5-1"  # After

迁移清单

  • 如果您的组织有零数据保留(ZDR)安排,请先确认资格:除非获得 Anthropic 明确授权,否则这些模型不适用于 ZDR。Claude Opus 4.8 可在 ZDR 下使用。
  • 将模型名称从 claude-opus-4-8 更新为 claude-fable-5-1(或 claude-mythos-5-1)。
  • 移除所有 thinking: {type: "disabled"} 配置并重新评估 max_tokens。不含 thinking 字段的请求会以自适应思考运行。
  • 更新按位置读取内容的响应解析逻辑(例如 content[0].text):响应可能以 thinking 块开头,因此请改为按 type 选择内容块。
  • 将强制 tool_choice(any 或 tool)替换为 auto 加上明确指令(user 轮次或对话中途的系统消息)和 strict: true 工具,或替换为 JSON 输出。
  • 原样传回 thinking 块,并将其文本视为仅用于显示。Claude Fable 5.1 和 Claude Mythos 5.1 可以读取 Claude Opus 4.8 的思考块:迁移到 claude-fable-5-1 或 claude-mythos-5-1 的对话会保留其较早的推理。Claude Opus 4.8 无法读取它们的思考块。
  • 如果您的代码自行构建 messages 数组,请检查它是否编辑较早的轮次。为 Claude Opus 4.8 及更早版本编写的集成经常会截断旧轮次、移除或重建较早的消息,或在每个请求中刷新 system 提示,而 Claude Opus 4.8 对这些操作都不会返回错误。在 claude-fable-5-1 和 claude-mythos-5-1 上,上述每种操作都会使之后的思考块失效。
  • 处理 stop_reason: "refusal",读取 stop_details.category,并考虑使用 fallbacks: "default"(beta)。
  • 应用 Claude Fable 5 检查清单中关于顾问、Priority Tier、保留思考、仅追加、行为、按消息设置 effort 和进度更新的各项。
  • 重新评估 effort(从 high 开始),检查接近 512 令牌缓存最小值(Claude Opus 4.8 上为 1,024 令牌)的提示,并重新建立成本和延迟基线。每令牌定价有所不同,且思考令牌按输出令牌计费,因此在 Claude Opus 4.8 上不使用思考运行的工作负载每次请求可能会产生更多输出令牌。

从 Claude Mythos 5 迁移到 Claude Mythos 5.1

Claude Mythos 5.1 是面向通过 Anthropic 验证计划(例如 Cyber Verification Program)验证的组织的 Claude Fable 5.1 对应模型。在切换模型 ID 之前,请确认您的组织有权访问 Claude Mythos 5.1。

从 Claude Fable 5 迁移到 Claude Fable 5.1 中的所有内容均适用,只需用 claude-mythos-5 和 claude-mythos-5-1 替换 Claude Fable 模型 ID。Claude Mythos 5.1 可以读取 Claude Mythos 5 的思考块;Claude Mythos 5 无法读取 Claude Mythos 5.1 的思考块。在 Claude Mythos 5.1 上,发回无效思考块且未设置 prefix_mismatch_behavior 的请求会收到 400 错误(请参阅未设置 prefix_mismatch_behavior 时)。

更新模型名称

model = "claude-mythos-5"  # Before
model = "claude-mythos-5-1"  # After

迁移清单

  • 使用 Claude Mythos 模型 ID 完成 Claude Fable 5 检查清单。跳过其中的 Priority Tier 一项:Claude Mythos 5 不支持 Priority Tier。
  • 在切换之前,运行其中针对编辑较早轮次的检查:Claude Mythos 5 接受这些编辑,但它们会使 Claude Mythos 5.1 的思考块失效。