Packages

@ai-sdk/anthropic

4.0.106 · 17 Nov 2026Apache-2.024.5M / weekRepositoryHomepagenpmAtom feed

Your version

3.0.137

30 Oct 2026Where it was published

3.0.143 is the newest release of 3.x.

In short

3 fixed

Release note

Patch Changes

  • anthropic: Use native structured outputs for Claude models that reject forced tool use (Sonnet 5.5, Opus 5.5, Fable 5.1) even when the provider disables them by default, as Amazon Bedrock and Google Vertex do. Self-referencing schemas keep the JSON response tool. Also keep definitions and $defs next to a top-level $ref when sanitizing structured output schemas, so the reference still resolves.

  • anthropic: When the JSON response tool is in use but the model answers in text without calling it (for example with manual thinking, where the forced tool choice is downgraded to auto), return the final answer text instead of dropping it. Text before a tool call, result, or message continuation is still dropped.

  • anthropic: Keep the JSON response tool for schemas that native structured outputs cannot represent when upgrading models that reject forced tool use. Schemas with open objects (maps, free-form objects) would otherwise come back as {}, and schemas with more than 10 optional properties can be rejected as too complex.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.