Skip to content

feat(ai-anthropic): add Claude Sonnet 5, Fable 5 and other missing models to type maps - #882

Merged
tombeckenham merged 2 commits into
TanStack:mainfrom
GucciPants:feat/claude-sonnet-5-fable-support
Jul 2, 2026
Merged

feat(ai-anthropic): add Claude Sonnet 5, Fable 5 and other missing models to type maps#882
tombeckenham merged 2 commits into
TanStack:mainfrom
GucciPants:feat/claude-sonnet-5-fable-support

Conversation

@GucciPants

@GucciPantsGucciPants commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Closes#880

Added the following models to ANTHROPIC_COMBINED_TOOLS_AND_SCHEMA_MODELS
and AnthropicChatModelToolCapabilitiesByName:

  • Claude Sonnet 5
  • Claude Fable 5
  • Opus 4.8
  • Opus 4.8 Fast
  • Opus 4.7 Fast (tool capabilities only)

Added type assertion tests for Sonnet 5 and Fable 5 covering provider
options, extended thinking, priority tier, base options, and input
modality constraints.

Note: Could not run pnpm test:pr locally due to disk space constraints.

Summary by CodeRabbit

  • New Features
    • Added support for additional Anthropic model variants, including Claude Sonnet 5, Claude Fable 5, and newer Opus 4.7/4.8 fast options.
    • Expanded tool and schema compatibility so these models share the same supported capabilities as other Anthropic chat models.
    • Improved model option coverage to better recognize supported settings and input types for the newly added models.

…dels to type maps
Added Claude Sonnet 5, Claude Fable 5, Opus 4.7 Fast, Opus 4.8, and
Opus 4.8 Fast to:
- ANTHROPIC_COMBINED_TOOLS_AND_SCHEMA_MODELS
- AnthropicChatModelToolCapabilitiesByName
Added type assertion tests for Sonnet 5 and Fable 5 covering provider
options, extended thinking, priority tier, base options, and input
modality constraints.
ClosesTanStack#880
@coderabbitai

coderabbitaiBot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 62472ed9-4d26-48fa-bb27-3b0084be2659

📥 Commits

Reviewing files that changed from the base of the PR and between 2e01c11 and 3d702d0.

📒 Files selected for processing (1)
  • .changeset/spotty-maps-walk.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/spotty-maps-walk.md

📝 Walkthrough

Walkthrough

This PR adds new Claude model identifiers to Anthropic model metadata, updates the release notes, and extends type tests for provider options and input modality support on claude-sonnet-5 and claude-fable-5.

Changes

Anthropic Model Metadata Additions

Layer / File(s)Summary
Model metadata updates
packages/ai-anthropic/src/model-meta.ts, .changeset/spotty-maps-walk.md
Adds CLAUDE_OPUS_4_8, CLAUDE_OPUS_4_8_FAST, CLAUDE_FABLE_5, CLAUDE_SONNET_5 to ANTHROPIC_COMBINED_TOOLS_AND_SCHEMA_MODELS, adds tool-capability typings for CLAUDE_OPUS_4_7_FAST, CLAUDE_OPUS_4_8, CLAUDE_OPUS_4_8_FAST, CLAUDE_FABLE_5, CLAUDE_SONNET_5, and records the patch in the changeset.
Provider options type test coverage
packages/ai-anthropic/tests/model-meta.test.ts
Extends type-assertion tests to cover claude-sonnet-5 and claude-fable-5 for provider option properties, container/context/MCP/stop-sequences/tool-choice/sampling options, and type discrimination.
Input modality type test coverage
packages/ai-anthropic/tests/model-meta.test.ts
Adds modality typing assertions verifying claude-sonnet-5 and claude-fable-5 accept text/image/document parts and reject audio/video parts.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers:AlemTuzlak

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Description check⚠️ WarningThe description covers the changes, but it omits the required checklist and release impact sections from the template.Add the checklist and release impact sections, and include the required testing and release details in the template format.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly summarizes the main change: adding missing Anthropic model support in type maps.
Linked Issues check✅ PassedThe PR adds Sonnet 5 and Fable support in the Anthropic type maps and adds type-level coverage for those models.
Out of Scope Changes check✅ PassedThe added models and tests stay within the Anthropic model-support area and do not introduce unrelated features.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloudBot commented Jul 2, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 3d702d0

CommandStatusDurationResult
nx run-many --targets=build --exclude=examples/...✅ Succeeded8sView ↗

☁️ Nx Cloud last updated this comment at 2026-07-02 10:23:16 UTC

@pkg-pr-new

pkg-pr-newBot commented Jul 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

@tanstack/ai

npm i https://pkg.pr.new/@tanstack/ai@882

@tanstack/ai-acp

npm i https://pkg.pr.new/@tanstack/ai-acp@882

@tanstack/ai-angular

npm i https://pkg.pr.new/@tanstack/ai-angular@882

@tanstack/ai-anthropic

npm i https://pkg.pr.new/@tanstack/ai-anthropic@882

@tanstack/ai-bedrock

npm i https://pkg.pr.new/@tanstack/ai-bedrock@882

@tanstack/ai-claude-code

npm i https://pkg.pr.new/@tanstack/ai-claude-code@882

@tanstack/ai-client

npm i https://pkg.pr.new/@tanstack/ai-client@882

@tanstack/ai-code-mode

npm i https://pkg.pr.new/@tanstack/ai-code-mode@882

@tanstack/ai-code-mode-skills

npm i https://pkg.pr.new/@tanstack/ai-code-mode-skills@882

@tanstack/ai-codex

npm i https://pkg.pr.new/@tanstack/ai-codex@882

@tanstack/ai-devtools-core

npm i https://pkg.pr.new/@tanstack/ai-devtools-core@882

@tanstack/ai-elevenlabs

npm i https://pkg.pr.new/@tanstack/ai-elevenlabs@882

@tanstack/ai-event-client

npm i https://pkg.pr.new/@tanstack/ai-event-client@882

@tanstack/ai-fal

npm i https://pkg.pr.new/@tanstack/ai-fal@882

@tanstack/ai-gemini

npm i https://pkg.pr.new/@tanstack/ai-gemini@882

@tanstack/ai-grok

npm i https://pkg.pr.new/@tanstack/ai-grok@882

@tanstack/ai-grok-build

npm i https://pkg.pr.new/@tanstack/ai-grok-build@882

@tanstack/ai-groq

npm i https://pkg.pr.new/@tanstack/ai-groq@882

@tanstack/ai-isolate-cloudflare

npm i https://pkg.pr.new/@tanstack/ai-isolate-cloudflare@882

@tanstack/ai-isolate-node

npm i https://pkg.pr.new/@tanstack/ai-isolate-node@882

@tanstack/ai-isolate-quickjs

npm i https://pkg.pr.new/@tanstack/ai-isolate-quickjs@882

@tanstack/ai-mcp

npm i https://pkg.pr.new/@tanstack/ai-mcp@882

@tanstack/ai-mistral

npm i https://pkg.pr.new/@tanstack/ai-mistral@882

@tanstack/ai-ollama

npm i https://pkg.pr.new/@tanstack/ai-ollama@882

@tanstack/ai-openai

npm i https://pkg.pr.new/@tanstack/ai-openai@882

@tanstack/ai-opencode

npm i https://pkg.pr.new/@tanstack/ai-opencode@882

@tanstack/ai-openrouter

npm i https://pkg.pr.new/@tanstack/ai-openrouter@882

@tanstack/ai-preact

npm i https://pkg.pr.new/@tanstack/ai-preact@882

@tanstack/ai-react

npm i https://pkg.pr.new/@tanstack/ai-react@882

@tanstack/ai-react-ui

npm i https://pkg.pr.new/@tanstack/ai-react-ui@882

@tanstack/ai-sandbox

npm i https://pkg.pr.new/@tanstack/ai-sandbox@882

@tanstack/ai-sandbox-cloudflare

npm i https://pkg.pr.new/@tanstack/ai-sandbox-cloudflare@882

@tanstack/ai-sandbox-daytona

npm i https://pkg.pr.new/@tanstack/ai-sandbox-daytona@882

@tanstack/ai-sandbox-docker

npm i https://pkg.pr.new/@tanstack/ai-sandbox-docker@882

@tanstack/ai-sandbox-local-process

npm i https://pkg.pr.new/@tanstack/ai-sandbox-local-process@882

@tanstack/ai-sandbox-sprites

npm i https://pkg.pr.new/@tanstack/ai-sandbox-sprites@882

@tanstack/ai-sandbox-vercel

npm i https://pkg.pr.new/@tanstack/ai-sandbox-vercel@882

@tanstack/ai-solid

npm i https://pkg.pr.new/@tanstack/ai-solid@882

@tanstack/ai-solid-ui

npm i https://pkg.pr.new/@tanstack/ai-solid-ui@882

@tanstack/ai-svelte

npm i https://pkg.pr.new/@tanstack/ai-svelte@882

@tanstack/ai-utils

npm i https://pkg.pr.new/@tanstack/ai-utils@882

@tanstack/ai-vue

npm i https://pkg.pr.new/@tanstack/ai-vue@882

@tanstack/ai-vue-ui

npm i https://pkg.pr.new/@tanstack/ai-vue-ui@882

@tanstack/openai-base

npm i https://pkg.pr.new/@tanstack/openai-base@882

@tanstack/preact-ai-devtools

npm i https://pkg.pr.new/@tanstack/preact-ai-devtools@882

@tanstack/react-ai-devtools

npm i https://pkg.pr.new/@tanstack/react-ai-devtools@882

@tanstack/solid-ai-devtools

npm i https://pkg.pr.new/@tanstack/solid-ai-devtools@882

commit: 3d702d0

@tombeckenham
tombeckenham merged commit f8b145f into TanStack:mainJul 2, 2026
10 checks passed
@github-actionsgithub-actionsBot mentioned this pull request Jul 2, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude Sonnet 5 and Fable support

3 participants

@GucciPants@AlemTuzlak@tombeckenham