Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vercel/ai
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ai@6.0.111
Choose a base ref
...
head repository: vercel/ai
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ai@6.0.112
Choose a head ref
  • 7 commits
  • 80 files changed
  • 7 contributors

Commits on Mar 3, 2026

  1. feat(anthropic): add web_fetch_20260209 and web_search_20260209 (#12668)

    <!--
    Welcome to contributing to AI SDK! We're excited to see your changes.
    
    We suggest you read the following contributing guide we've created
    before submitting:
    
    https://github.com/vercel/ai/blob/main/CONTRIBUTING.md
    -->
    
    ## Background
    Anthropic introduced new web tool versions (`web_search_20260209` and
    `web_fetch_20260209`) that include dynamic filtering capabilities, but
    those versions were not yet available in AI SDK.
    
    ## Summary
    
    This PR adds support for `web_search_20260209` and `web_fetch_20260209`
    in the Anthropic provider.
    
    ## Checklist
      - [x] Tests have been added / updated (for bug fixes / features)
    - [ ] Documentation has been added / updated (for bug fixes / features)
    - [x] A _patch_ changeset for relevant packages has been added (for bug
    fixes / features - run `pnpm changeset` in the project root)
      - [x] I have reviewed this pull request (self-review)
    
    ---------
    
    Co-authored-by: Felix Arntz <felix.arntz@vercel.com>
    MehediH and felixarntz authored Mar 3, 2026
    Configuration menu
    Copy the full SHA
    56c67d5 View commit details
    Browse the repository at this point in the history
  2. Version Packages (#13041)

    This PR was opened by the [Changesets
    release](https://github.com/changesets/action) GitHub action. When
    you're ready to do a release, you can merge this and the packages will
    be published to npm automatically. If you're not ready to do a release
    yet, that's fine, whenever you add more changesets to main, this PR will
    be updated.
    
    
    # Releases
    ## @ai-sdk/amazon-bedrock@4.0.73
    
    ### Patch Changes
    
    -   Updated dependencies [56c67d5]
        -   @ai-sdk/anthropic@3.0.54
    
    ## @ai-sdk/anthropic@3.0.54
    
    ### Patch Changes
    
    - 56c67d5: feat(provider/anthropic): add support for Anthropic web tools
    `web_fetch_20260209` and `web_search_20260209`
    
    ## @ai-sdk/google-vertex@4.0.73
    
    ### Patch Changes
    
    -   Updated dependencies [56c67d5]
        -   @ai-sdk/anthropic@3.0.54
    
    Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
    vercel-ai-sdk[bot] authored Mar 3, 2026
    Configuration menu
    Copy the full SHA
    cc31c90 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2026

  1. docs: add provider options documentation page (#13047)

    ## Summary
    
    Add comprehensive documentation for provider options, covering
    configuration, setup, and best practices for providers in the system.
    
    ## Changes
    
    **Documentation
    (`content/docs/02-foundations/06-provider-options.mdx`)**
    
    - Create new provider options documentation page with detailed
    explanations
    - Include provider configuration examples and use cases
    - Document available options and their purposes
    - Add best practices and implementation guidelines
    
    **Documentation Index (`content/docs/02-foundations/index.mdx`)**
    
    - Register new provider options documentation page in the foundations
    section navigation
    
    Co-authored-by: nicoalbanese <49612682+nicoalbanese@users.noreply.github.com>
    openharness[bot] and nicoalbanese authored Mar 4, 2026
    Configuration menu
    Copy the full SHA
    2cd9553 View commit details
    Browse the repository at this point in the history
  2. fix(anthropic): handle encrypted_code_execution_result for multi-turn…

    … with web_fetch/web_search 20260209 (#13046)
    
    ## Problem
    
    When using `web_fetch_20260209` or `web_search_20260209`, the Anthropic
    API auto-injects a `code_execution` `server_tool_use` block in the
    response and returns its result as an `encrypted_code_execution_result`.
    The SDK previously only handled `code_execution_result` and
    `code_execution_tool_result_error` types, so the encrypted result was
    **silently dropped**.
    
    In multi-turn conversations, the absence of this
    `code_execution_tool_result` in the subsequent user message caused the
    Anthropic API to return:
    
    ```
    messages.1: `code_execution` tool use with id `srvtoolu_01HopAaXMHo9To3RavUYwqy7` was found without a corresponding `code_execution_tool_result` block
    ```
    
    Repro: use the example pages in `examples/ai-e2e-next`:
    - `/chat/anthropic-web-fetch-20260209`
    - `/chat/anthropic-web-search-20260209`
    
    Then send a follow-up message after a tool call was made in the previous
    response.
    
    Fixes #13040
    
    ## Fix
    
    - **`anthropic-messages-language-model.ts`** (both streaming and
    non-streaming paths): when `code_execution_tool_result.content.type ===
    'encrypted_code_execution_result'`, emit a `tool-result` event carrying
    the encrypted payload so it is preserved in the conversation history
    - **`convert-to-anthropic-messages-prompt.ts`**: when reconstructing the
    user message for multi-turn, detect `encrypted_code_execution_result`
    output and emit the correct `code_execution_tool_result` block with the
    encrypted content (checked before the existing `code_execution_result`
    branch)
    - **`convert-to-anthropic-messages-prompt.test.ts`**: add a test
    covering the encrypted result round-trip in a multi-turn context
    
    ---------
    
    Co-authored-by: Dmitrii Troitskii <jsleitor@gmail.com>
    Co-authored-by: Felix Arntz <felix.arntz@vercel.com>
    3 people authored Mar 4, 2026
    Configuration menu
    Copy the full SHA
    7531e72 View commit details
    Browse the repository at this point in the history
  3. Version Packages (#13052)

    This PR was opened by the [Changesets
    release](https://github.com/changesets/action) GitHub action. When
    you're ready to do a release, you can merge this and the packages will
    be published to npm automatically. If you're not ready to do a release
    yet, that's fine, whenever you add more changesets to main, this PR will
    be updated.
    
    
    # Releases
    ## @ai-sdk/amazon-bedrock@4.0.74
    
    ### Patch Changes
    
    -   Updated dependencies [7531e72]
        -   @ai-sdk/anthropic@3.0.55
    
    ## @ai-sdk/anthropic@3.0.55
    
    ### Patch Changes
    
    - 7531e72: fix(provider/anthropic): handle
    encrypted_code_execution_result for multi-turn with web_fetch/web_search
    20260209
    
    ## @ai-sdk/google-vertex@4.0.74
    
    ### Patch Changes
    
    -   Updated dependencies [7531e72]
        -   @ai-sdk/anthropic@3.0.55
    
    Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
    vercel-ai-sdk[bot] authored Mar 4, 2026
    Configuration menu
    Copy the full SHA
    8b13c57 View commit details
    Browse the repository at this point in the history
  4. chore(provider/gateway): update gateway model settings files (#13050)

    This is an automated update of the gateway model settings files.
    
    Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
    vercel-ai-sdk[bot] authored Mar 4, 2026
    Configuration menu
    Copy the full SHA
    db3d4ca View commit details
    Browse the repository at this point in the history
  5. Version Packages (#13053)

    This PR was opened by the [Changesets
    release](https://github.com/changesets/action) GitHub action. When
    you're ready to do a release, you can merge this and the packages will
    be published to npm automatically. If you're not ready to do a release
    yet, that's fine, whenever you add more changesets to main, this PR will
    be updated.
    
    
    # Releases
    ## ai@6.0.112
    
    ### Patch Changes
    
    -   Updated dependencies [db3d4ca]
        -   @ai-sdk/gateway@3.0.64
    
    ## @ai-sdk/angular@2.0.113
    
    ### Patch Changes
    
    -   ai@6.0.112
    
    ## @ai-sdk/gateway@3.0.64
    
    ### Patch Changes
    
    - db3d4ca: chore(provider/gateway): update gateway model settings files
    
    ## @ai-sdk/langchain@2.0.118
    
    ### Patch Changes
    
    -   ai@6.0.112
    
    ## @ai-sdk/llamaindex@2.0.112
    
    ### Patch Changes
    
    -   ai@6.0.112
    
    ## @ai-sdk/react@3.0.114
    
    ### Patch Changes
    
    -   ai@6.0.112
    
    ## @ai-sdk/rsc@2.0.112
    
    ### Patch Changes
    
    -   ai@6.0.112
    
    ## @ai-sdk/svelte@4.0.112
    
    ### Patch Changes
    
    -   ai@6.0.112
    
    ## @ai-sdk/vue@3.0.112
    
    ### Patch Changes
    
    -   ai@6.0.112
    
    Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
    vercel-ai-sdk[bot] authored Mar 4, 2026
    Configuration menu
    Copy the full SHA
    a676c69 View commit details
    Browse the repository at this point in the history
Loading