跳至主要內容

Day 0 支援:Claude Fable 5.1

LiteLLM x Claude Fable 5.1

LiteLLM 支援 Claude Fable 5.1 的 Day 0,上線於 Anthropic、Bedrock、Gemini Enterprise Agent Platform 和 Azure,並將花費、速率限制、備援與記錄集中於一處。

Fable 5.1 的新功能​

定價、1M-token 上下文視窗、128K 輸出上限,以及持續啟用的自適應思考,都沿用自 Fable 5。改變的部分如下,依照對 gateway 的成本影響排序:

  • 快取讀取費用降至 $0.25 / MTok,低於原本的 $1.00。 這是 0.025x 的基礎輸入價格,而其他所有 Claude 模型皆為 0.1x。LiteLLM 會從 cost map 讀取此費率;若沒有此費率,則回退為基礎輸入,會造成 40 倍高估。
  • 強制 tool use 會回傳 400。 Thinking 一直啟用,而強制呼叫會跳過它。LiteLLM 會將 OpenAI 的 tool_choice: "required" 對應到 Anthropic 的 any,因此在 Fable 5 上可運作的請求,到了這裡會在不變更的情況下失敗。若要取得 schema-valid 的 JSON,請將 auto 與 strict: true 一起使用,或在提示中指定工具名稱以強制呼叫。
  • Thinking blocks 會綁定到撰寫它們的模型。 Fable 5.1 會讀取較早模型的 blocks;但沒有任何模型能讀取它自己的 blocks。
  • 編輯較早的回合會使 thinking blocks 失效。 在對話進行中重建 system 或 tools 會回傳 The block is bound to a different conversation;此情況適用於自 2026 年 8 月 31 日起建立的帳戶。
  • Effort 可透過每則訊息進行調整,位於 mid-conversation-output-config-2026-07-01 beta header 之後,不會使 prompt cache 失效。

Anthropic 的 新功能頁面 提供基準測試與功能提升。

用法​

model_list:
- model_name: claude-fable-5-1
litellm_params:
model: anthropic/claude-fable-5-1
api_key: os.environ/ANTHROPIC_API_KEY
curl --location 'http://0.0.0.0:4000/chat/completions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $LITELLM_KEY' \
--data '{
"model": "claude-fable-5-1",
"messages": [{"role": "user", "content": "what llm are you"}],
"reasoning_effort": "xhigh"
}'

reasoning_effort 對應到 adaptive thinking,這是 Fable 5.1 唯一接受的模式。固定預算、assistant prefill,以及非預設的 temperature 或 top_p 會回傳 400。傳入 output_config: {"effort": "max"} 可取得完整階層 Fable 5 uses。

回饋​

遇到意料之外的情況嗎?請在 GitHub 討論 #39163 分享。