feat(models): add Claude Fable 5.1 and align Anthropic prompt-cache minimums
Merged
WA
2mo ago+110+110+012345678901234567890123456789-8-8-0123456789
Summary
- add
claude-fable-5-1to the Anthropic provider: $10/$50 per MTok, $0.25 cache read (0.025x, unlike the 0.1x on every other Claude model), 1M context, 128K output, all five effort levels, native structured outputs, summarized thinking streaming - Fable 5.1 returns a 400 for
tool_choicetool/any, so the Anthropic core now sendsauto(with a warning) instead of the forced tool_choice for that model family; thinking is always on for it so a forced call would have skipped thinking anyway - align per-model prompt-cache minimums with the current Anthropic docs: 512 for Fable 5.x / Opus 5, 2048 for Opus 4.7, 4096 for Opus 4.6 / Opus 4.5 / Haiku 4.5 (previously the provider default of 1024, and 2048 for Haiku)
- regenerate the agent streamed-thinking docs table
Type of Change
- New feature
Testing
- ran every effort level (low → max),
none, legacy non-agent-events, streaming, streaming + tools, forced tool, and native structured output against the live API for bothclaude-fable-5-1andclaude-sonnet-5through the provider code; all succeeded with the expectedthinking/output_config/tool_choicepayloads - confirmed against the live API that Fable 5.1 rejects forced tool_choice, non-default temperature,
thinking: disabled, andbudget_tokens, and that the Models API reports 1M input / 128K output for both models bun run lint,bun run type-check,bun run check:audits, provider unit tests
Checklist
- Code follows project style guidelines
- Self-reviewed my changes
- Tests added/updated and passing
- No new warnings introduced
- I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)