Packages

@ai-sdk/amazon-bedrock

5.0.145 · 17 Nov 2026Apache-2.06.9M / weekRepositoryHomepagenpmAtom feed

Your version

4.0.0

major22 Dec 2025Where it was published

4.0.217 is the newest release of 4.x.

In short

1 breaking21 new9 fixed10 internal

  • Breaking

    Ai SDK 6 beta

Release note

Major Changes

  • Breaking

    Ai SDK 6 beta

Patch Changes

  • provider: Add specificationVersion to ProviderV3

  • bedrock: Send {} as tool input when streaming tool calls without arguments

  • provider/amazon-bedrock: Expose stop_sequence in provider metadata

    The Bedrock provider now exposes the specific stop sequence that triggered generation to halt via providerMetadata.bedrock.stopSequence. This is implemented by:

    • Requesting /stop_sequence via additionalModelResponseFieldPaths in the API call

    • Parsing the value from additionalModelResponseFields.stop_sequence in both generate and stream responses

    • Exposing it as stopSequence in the provider metadata (returns null when no stop sequence was matched)

  • provider: Shared spec v3

  • feat(openai); update spec for mcp approval

  • Fix reasoning with Bedrock when additionalModelRequestFields is used

  • Fix (provider/amazon-bedrock): deal gracefully with empty tool descriptions

  • Shorthand names for reranking models

  • EmbeddingModelV3

  • amazon-bedrock: Clamp temperature to valid 0-1 range with warnings

  • Support user provided filenames in amazon-bedrock-provider

  • Tool execution approval

  • Provider-V3

  • Extended token usage

  • Added support for reranking models

  • Add provider version to user-agent header

  • LanguageModelV3

  • Image editing

  • Support citations in amazon-bedrock-provider

  • provider/amazon-bedrock: Normalise headers and body if input is of instance Request

  • provider/amazon-bedrock,provider/google-vertex-anthropic: Add support for tool calling with structured output

    Added support for combining tool calling with structured outputs in both Amazon Bedrock and Google Vertex Anthropic providers. This allows developers to use tools (like weather lookups, web search, etc.) alongside structured JSON output schemas, enabling multi-step agentic workflows with structured final outputs.

    Amazon Bedrock Changes:

    • Removed incorrect warning that prevented using tools with JSON response format

    • Updated tool choice to use { type: 'required' } instead of specific tool selection when using structured outputs

    • Added isJsonResponseFromTool parameter to finish reason mapping

    • JSON tool responses are correctly converted to text content and finish reason is mapped from tool_use to stop

    • Added comprehensive test coverage for combining tools with structured outputs

    • Added example files demonstrating the feature

    Google Vertex Anthropic Changes:

    • Inherits support from underlying Anthropic provider implementation

    • Added test coverage to verify the feature works correctly

    • Added example files demonstrating the feature

    This brings Anthropic provider's structured output capabilities to the Amazon Bedrock and Google Vertex Anthropic providers.

  • Add Claude Sonnet 4.5 (claude-sonnet-4-5-20250929-v1:0) model support

  • ImageModelV3

  • amazon-bedrock: Move anthropic_beta to request body

  • Flexible tool output content support

  • Expose raw finish reason

  • provider/bedrock: Support Nova 2 extended reasoning maxReasoningEffort field

  • Moved dependency @ai-sdk/test-server to devDependencies

  • Add stop sequence support for amazon bedrock provider

  • tool-specific strict mode

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.