-
-
Notifications
You must be signed in to change notification settings - Fork 231
feat: add Claude Fable 5 and sync Anthropic models from the first-party Models API #733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tombeckenham
wants to merge
4
commits into
TanStack:main
Choose a base branch
from
tombeckenham:claude/fable-model-support-qoigw1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,520
−48
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b4cd2f4
feat: add Anthropic Claude Fable 5 model to Anthropic and OpenRouter …
claude 6a6001d
feat: sync Anthropic models from the first-party Models API instead o…
claude c7a87a9
fix: correct Anthropic model pricing, ids, and limits against the liv…
tombeckenham 2e15251
ci: run the Anthropic Models API sync in the nightly model-metadata w…
tombeckenham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| '@tanstack/ai-anthropic': patch | ||
| '@tanstack/ai-openrouter': patch | ||
| --- | ||
|
|
||
| Add support for Anthropic's Claude Fable 5 model (`claude-fable-5` on the Anthropic adapter, `anthropic/claude-fable-5` on the OpenRouter adapter), including model metadata, per-model provider option types, and input modality types. | ||
|
|
||
| Also correct Anthropic model metadata against the live Models API and https://platform.claude.com/docs/en/about-claude/pricing: | ||
|
|
||
| - `claude-opus-4-5` pricing is $5/MTok input and $25/MTok output (was wrongly listed at $15/$75); cache-read (`cached`) prices are now populated for all models that publish them. | ||
| - Fix invalid OpenRouter-style ids `claude-opus-4.8`/`claude-opus-4.8-fast` to the real Anthropic API ids `claude-opus-4-8`/`claude-opus-4-8-fast` (the dotted ids 404 against the Anthropic API). | ||
| - Correct stale context windows and output limits per the Models API: Opus 4.6, Sonnet 4.5, and Sonnet 4 have 1M context; Sonnet 4.6 supports 128K output; Opus 4.5 supports 64K output; Opus 4.1 caps at 32K output. | ||
| - Register `claude-fable-5`, `claude-opus-4-7-fast`, `claude-opus-4-8`, and `claude-opus-4-8-fast` in `AnthropicChatModelToolCapabilitiesByName` so server tools type-check on those models (the sync script now maintains this map too). | ||
| - Update `@anthropic-ai/sdk` to ^0.104.0, whose `Model` union includes `claude-fable-5` and `claude-opus-4-8`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Does Anthropic's Claude Fable 5 model support extended thinking or thinking budget configuration via the thinking parameter?💡 Result:
Anthropic's Claude Fable 5 model does not support manual extended thinking configuration via the traditional
thinkingparameter andbudget_tokens[1][2][3]. Instead, Claude Fable 5 uses "adaptive thinking," which is permanently enabled and cannot be disabled [1][3]. Because thinking is always active, attempting to use the manualthinking: {type: "enabled", budget_tokens: N}configuration will result in a 400 error [2][3]. Similarly, attempting to disable it withthinking: {type: "disabled"}is not supported and will also trigger an error [2]. In place of a manual token budget, you manage the trade-off between intelligence, latency, and cost on Claude Fable 5 using theeffortparameter [4][3]. Theeffortparameter allows you to guide the model's adaptive thinking process, with options such ashigh(recommended default),xhigh(for maximum capability), andmediumorlow(for routine tasks) [4].Citations:
🏁 Script executed:
Repository: TanStack/ai
Length of output: 98
🏁 Script executed:
Repository: TanStack/ai
Length of output: 7131
🏁 Script executed:
Repository: TanStack/ai
Length of output: 8295
🏁 Script executed:
Repository: TanStack/ai
Length of output: 98
🏁 Script executed:
Repository: TanStack/ai
Length of output: 15363
🏁 Script executed:
Repository: TanStack/ai
Length of output: 7337
🏁 Script executed:
Repository: TanStack/ai
Length of output: 21944
🏁 Script executed:
Repository: TanStack/ai
Length of output: 4262
🏁 Script executed:
Repository: TanStack/ai
Length of output: 9999
🏁 Script executed:
Repository: TanStack/ai
Length of output: 644
🏁 Script executed:
Repository: TanStack/ai
Length of output: 121
🏁 Script executed:
Repository: TanStack/ai
Length of output: 3042
🏁 Script executed:
Repository: TanStack/ai
Length of output: 3910
Fix
AnthropicThinkingOptionstyping forCLAUDE_FABLE_5packages/ai-anthropic/src/model-meta.tssetsCLAUDE_FABLE_5.supports.extended_thinking: falsebut the model’s provider options still includeAnthropicThinkingOptions(lines 722-760, 945-952). Claude Fable 5 only supports “adaptive thinking” viaeffortand does not acceptthinking: { type: 'enabled', budget_tokens }(400). RemoveAnthropicThinkingOptionsfrom the Fable 5 provider-options type and type the adaptive/effortcontrols instead.🤖 Prompt for AI Agents