Skip to content

feat: v6#6

Merged
callycodes merged 993 commits intomainfrom
v6
Jan 8, 2026
Merged

feat: v6#6
callycodes merged 993 commits intomainfrom
v6

Conversation

@callycodes
Copy link
Copy Markdown

Background

Summary

Manual Verification

Checklist

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • Formatting issues have been fixed (run pnpm prettier-fix in the project root)
  • I have reviewed this pull request (self-review)

Future Work

Related Issues

nicoalbanese and others added 30 commits December 9, 2025 15:43
…vercel#10999)

Structured outputs section was missing example and link.
## Background

This adds express mode support to Vertex which is a simplified version
of authentication compared to the default OAuth flow.

## Summary

Express mode uses a different base URL and requires the api key to be
added as a search parameter. Since we need to bypass the default OAuth
flow I also added checks to the

## Manual Verification

Haven't been able to do this yet due to my Google account being old and
messed up. Still posting this PR in the meantime.
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.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @ai-sdk/google-vertex@4.0.0-beta.107

### Patch Changes

-   024e778: feat(provider/vertext): add express mode support

Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
…11007)

## Background

xai supports file search through openai compatibility but this wasn't
documented

## Summary

- added file search tool section to xai docs
- added example showing how to use openai provider with xai base url for
file search

## Checklist

- [ ] Tests have been added / updated (for bug fixes / features)
- [x] Documentation has been added / updated (for bug fixes / features)
- [ ] 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)
…ercel#11005)

## Background

Anthropic's web_fetch and web_search tools can return `null` for the
title field when a page doesn't have a proper title or content retrieval
fails. The zod type validation in the sdk was not accounting for this
behavior, causing AI_TypeValidationError when Anthropic returned a null
title.

## Summary

  - Updated title field to be nullable (z.string().nullable()) in:
          - web-fetch-20250910.ts
          - web-search_20250305.ts
 - Updated corresponding TypeScript types to title: string | null
 - Added unit tests for both schemas to verify null title handling

## Manual Verification

Unit tests were added

## Checklist

<!--
Do not edit this list. Leave items unchecked that don't apply. If you
need to track subtasks, create a new "## Tasks" section

Please check if the PR fulfills the following requirements:
-->

- [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)

Fixes : vercel#10986

---------

Co-authored-by: Aayush Kapoor <aayushkapoor34@gmail.com>
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.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @ai-sdk/amazon-bedrock@4.0.0-beta.90

### Patch Changes

-   Updated dependencies [05d5b9a]
    -   @ai-sdk/anthropic@3.0.0-beta.80

## @ai-sdk/anthropic@3.0.0-beta.80

### Patch Changes

- 05d5b9a: fix(anthropic): make title field nullable in web_fetch and
web_search tool output schemas

## @ai-sdk/google-vertex@4.0.0-beta.108

### Patch Changes

-   Updated dependencies [05d5b9a]
    -   @ai-sdk/anthropic@3.0.0-beta.80

Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
…#11006)

## Background

follow-up to vercel#10931 which adds express mode support to google vertex.
this pr adds the corresponding documentation

## Summary

- added express mode section to google vertex provider docs

## Checklist

- [ ] Tests have been added / updated (for bug fixes / features)
- [x] Documentation has been added / updated (for bug fixes / features)
- [ ] 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)

## Related Issues

follow-up to vercel#10931
…es (vercel#11026)

## Background

`AgentCallParameters` and `AgentStreamParameters` are needed for
building custom `Agent` implementations.

## Summary

Export `AgentCallParameters` and `AgentStreamParameters` types.
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.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## ai@6.0.0-beta.140

### Patch Changes

- 7fdd89d: feat(agent): export AgentCallParameters and
AgentStreamParameters types

## @ai-sdk/angular@2.0.0-beta.140

### Patch Changes

-   Updated dependencies [7fdd89d]
    -   ai@6.0.0-beta.140

## @ai-sdk/langchain@2.0.0-beta.140

### Patch Changes

-   Updated dependencies [7fdd89d]
    -   ai@6.0.0-beta.140

## @ai-sdk/llamaindex@2.0.0-beta.140

### Patch Changes

-   Updated dependencies [7fdd89d]
    -   ai@6.0.0-beta.140

## @ai-sdk/react@3.0.0-beta.142

### Patch Changes

-   Updated dependencies [7fdd89d]
    -   ai@6.0.0-beta.140

## @ai-sdk/rsc@2.0.0-beta.142

### Patch Changes

-   Updated dependencies [7fdd89d]
    -   ai@6.0.0-beta.140

## @ai-sdk/svelte@4.0.0-beta.140

### Patch Changes

-   Updated dependencies [7fdd89d]
    -   ai@6.0.0-beta.140

## @ai-sdk/vue@3.0.0-beta.140

### Patch Changes

-   Updated dependencies [7fdd89d]
    -   ai@6.0.0-beta.140

Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
…cks (vercel#11029)

## Background

Having context available in `onFinish` can help with tearing down
resources.

## Summary

Pass context into the `onFinish` handlers of `streamText` and
`generateText`.
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.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## ai@6.0.0-beta.141

### Patch Changes

- b1405bf: feat(ai): send context into streamText / generateText
onFinish callbacks

## @ai-sdk/angular@2.0.0-beta.141

### Patch Changes

-   Updated dependencies [b1405bf]
    -   ai@6.0.0-beta.141

## @ai-sdk/langchain@2.0.0-beta.141

### Patch Changes

-   Updated dependencies [b1405bf]
    -   ai@6.0.0-beta.141

## @ai-sdk/llamaindex@2.0.0-beta.141

### Patch Changes

-   Updated dependencies [b1405bf]
    -   ai@6.0.0-beta.141

## @ai-sdk/react@3.0.0-beta.143

### Patch Changes

-   Updated dependencies [b1405bf]
    -   ai@6.0.0-beta.141

## @ai-sdk/rsc@2.0.0-beta.143

### Patch Changes

-   Updated dependencies [b1405bf]
    -   ai@6.0.0-beta.141

## @ai-sdk/svelte@4.0.0-beta.141

### Patch Changes

-   Updated dependencies [b1405bf]
    -   ai@6.0.0-beta.141

## @ai-sdk/vue@3.0.0-beta.141

### Patch Changes

-   Updated dependencies [b1405bf]
    -   ai@6.0.0-beta.141

Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
Add a community provider from MiniMax use Minimax-M2

---------

Co-authored-by: qinjiu <qinjiu@minimaxi.com>
Co-authored-by: nicoalbanese <gcalbanese96@gmail.com>
…ercel#10171)

## Background

`experimental_context` is only available in tool execution but not in
the prepareStep callback. This prevents developers from using context
data (like user session info or auth state) when making step-specific
decisions in multi-step workflows.

## Summary

Added experimental_context as an optional parameter to the prepareStep
callback.

## Manual Verification

Tested with both generateText and streamText.

Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
## Background

Context needed to be supported in `ToolLoopAgent` `onFinish` as well.

## Summary

Add `experimental_context` to `ToolLoopAgent.onFinish` callback
definition.

## Related Issues

Follow up from vercel#11029
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.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## ai@6.0.0-beta.142

### Patch Changes

-   7169511: feat(agent): support context in onFinish callback
-   bbdcb81: Add experimental_context parameter to prepareStep callback

## @ai-sdk/angular@2.0.0-beta.142

### Patch Changes

-   Updated dependencies [7169511]
-   Updated dependencies [bbdcb81]
    -   ai@6.0.0-beta.142

## @ai-sdk/langchain@2.0.0-beta.142

### Patch Changes

-   Updated dependencies [7169511]
-   Updated dependencies [bbdcb81]
    -   ai@6.0.0-beta.142

## @ai-sdk/llamaindex@2.0.0-beta.142

### Patch Changes

-   Updated dependencies [7169511]
-   Updated dependencies [bbdcb81]
    -   ai@6.0.0-beta.142

## @ai-sdk/react@3.0.0-beta.144

### Patch Changes

-   Updated dependencies [7169511]
-   Updated dependencies [bbdcb81]
    -   ai@6.0.0-beta.142

## @ai-sdk/rsc@2.0.0-beta.144

### Patch Changes

-   Updated dependencies [7169511]
-   Updated dependencies [bbdcb81]
    -   ai@6.0.0-beta.142

## @ai-sdk/svelte@4.0.0-beta.142

### Patch Changes

-   Updated dependencies [7169511]
-   Updated dependencies [bbdcb81]
    -   ai@6.0.0-beta.142

## @ai-sdk/vue@3.0.0-beta.142

### Patch Changes

-   Updated dependencies [7169511]
-   Updated dependencies [bbdcb81]
    -   ai@6.0.0-beta.142

Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
…#11040)

## Background

Similar to modifying messages, model, etc. it would be useful to be able
to modify the experimental context for each step.

## Summary

* improve jsdoc of `PrepareStepFunction` and `PrepareStepResult`
* allow modification of `experimental_context` in `prepareStep`

## Related Issues

Builds on vercel#10171
Resolves vercel#10482
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.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## ai@6.0.0-beta.143

### Patch Changes

- 81e29ab: feat(ai): allow modifying experimental context in prepareStep
-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46
    -   @ai-sdk/gateway@2.0.0-beta.75

## @ai-sdk/amazon-bedrock@4.0.0-beta.91

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46
    -   @ai-sdk/anthropic@3.0.0-beta.81

## @ai-sdk/angular@2.0.0-beta.143

### Patch Changes

-   Updated dependencies [81e29ab]
-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46
    -   ai@6.0.0-beta.143

## @ai-sdk/anthropic@3.0.0-beta.81

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/assemblyai@2.0.0-beta.48

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/azure@3.0.0-beta.92

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46
    -   @ai-sdk/openai@3.0.0-beta.90

## @ai-sdk/baseten@1.0.0-beta.49

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46
    -   @ai-sdk/openai-compatible@2.0.0-beta.47

## @ai-sdk/black-forest-labs@1.0.0-beta.17

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/cerebras@2.0.0-beta.51

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46
    -   @ai-sdk/openai-compatible@2.0.0-beta.47

## @ai-sdk/cohere@3.0.0-beta.47

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/deepgram@2.0.0-beta.47

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/deepinfra@2.0.0-beta.47

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46
    -   @ai-sdk/openai-compatible@2.0.0-beta.47

## @ai-sdk/deepseek@2.0.0-beta.49

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/elevenlabs@2.0.0-beta.46

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/fal@2.0.0-beta.47

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/fireworks@2.0.0-beta.47

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46
    -   @ai-sdk/openai-compatible@2.0.0-beta.47

## @ai-sdk/gateway@2.0.0-beta.75

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/gladia@2.0.0-beta.46

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/google@3.0.0-beta.69

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/google-vertex@4.0.0-beta.109

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46
    -   @ai-sdk/anthropic@3.0.0-beta.81
    -   @ai-sdk/google@3.0.0-beta.69

## @ai-sdk/groq@3.0.0-beta.49

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/huggingface@1.0.0-beta.43

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46
    -   @ai-sdk/openai-compatible@2.0.0-beta.47

## @ai-sdk/hume@2.0.0-beta.46

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/langchain@2.0.0-beta.143

### Patch Changes

-   Updated dependencies [81e29ab]
    -   ai@6.0.0-beta.143

## @ai-sdk/llamaindex@2.0.0-beta.143

### Patch Changes

-   Updated dependencies [81e29ab]
    -   ai@6.0.0-beta.143

## @ai-sdk/lmnt@2.0.0-beta.46

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/luma@2.0.0-beta.46

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/mcp@1.0.0-beta.32

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/mistral@3.0.0-beta.48

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/openai@3.0.0-beta.90

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/openai-compatible@2.0.0-beta.47

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/perplexity@3.0.0-beta.48

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/provider-utils@4.0.0-beta.46

### Patch Changes

-   81e29ab: chore: update docs

## @ai-sdk/react@3.0.0-beta.145

### Patch Changes

-   Updated dependencies [81e29ab]
-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46
    -   ai@6.0.0-beta.143

## @ai-sdk/replicate@2.0.0-beta.46

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/revai@2.0.0-beta.46

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/rsc@2.0.0-beta.145

### Patch Changes

-   Updated dependencies [81e29ab]
-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46
    -   ai@6.0.0-beta.143

## @ai-sdk/svelte@4.0.0-beta.143

### Patch Changes

-   Updated dependencies [81e29ab]
-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46
    -   ai@6.0.0-beta.143

## @ai-sdk/togetherai@2.0.0-beta.48

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46
    -   @ai-sdk/openai-compatible@2.0.0-beta.47

## @ai-sdk/valibot@2.0.0-beta.46

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46

## @ai-sdk/vercel@2.0.0-beta.47

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46
    -   @ai-sdk/openai-compatible@2.0.0-beta.47

## @ai-sdk/vue@3.0.0-beta.143

### Patch Changes

-   Updated dependencies [81e29ab]
-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46
    -   ai@6.0.0-beta.143

## @ai-sdk/xai@3.0.0-beta.54

### Patch Changes

-   Updated dependencies [81e29ab]
    -   @ai-sdk/provider-utils@4.0.0-beta.46
    -   @ai-sdk/openai-compatible@2.0.0-beta.47

Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
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.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @ai-sdk/react@3.0.0-beta.146

### Patch Changes

- c388279: force update of vulnerable react versions through peer
dependency range

Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
## Background

Improving ai gateway error message. 

## Summary

Improving ai gateway error message. 

## Checklist

- [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)

## Future Work

Shortlink for v5 will be vercel.link/unauthenticated-ai-gateway. Once v6
stable is release, update links to

v6: vercel.link/unauthenticated-ai-gateway
v5: vercel.link/unauthenticated-ai-gateway-v5
and update the URLs behind them.

---------

Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
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.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## ai@6.0.0-beta.144

### Patch Changes

- ab6f01a: Improve ai gateway error message when api key is not present

## @ai-sdk/angular@2.0.0-beta.144

### Patch Changes

-   Updated dependencies [ab6f01a]
    -   ai@6.0.0-beta.144

## @ai-sdk/langchain@2.0.0-beta.144

### Patch Changes

-   Updated dependencies [ab6f01a]
    -   ai@6.0.0-beta.144

## @ai-sdk/llamaindex@2.0.0-beta.144

### Patch Changes

-   Updated dependencies [ab6f01a]
    -   ai@6.0.0-beta.144

## @ai-sdk/react@3.0.0-beta.147

### Patch Changes

-   Updated dependencies [ab6f01a]
    -   ai@6.0.0-beta.144

## @ai-sdk/rsc@2.0.0-beta.146

### Patch Changes

-   Updated dependencies [ab6f01a]
    -   ai@6.0.0-beta.144

## @ai-sdk/svelte@4.0.0-beta.144

### Patch Changes

-   Updated dependencies [ab6f01a]
    -   ai@6.0.0-beta.144

## @ai-sdk/vue@3.0.0-beta.144

### Patch Changes

-   Updated dependencies [ab6f01a]
    -   ai@6.0.0-beta.144

Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
…11011)

## Background

AI Gateway is adding support for users to pass BYOK with individual requests via provider options.

## Summary

Added new provider option to pass BYOK credentials for providers as desired, and an example script to validate the new option.

## Manual Verification

Ran new example with anthropic key against gateway service supporting the feature and observed successful response with provider metadata showing the request-scoped key was used.

## Checklist

- [x] Tests have been added / updated (for bug fixes / features)
- [x] 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)
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.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## ai@6.0.0-beta.145

### Patch Changes

-   Updated dependencies [34ee8d0]
    -   @ai-sdk/gateway@2.0.0-beta.76

## @ai-sdk/angular@2.0.0-beta.145

### Patch Changes

-   ai@6.0.0-beta.145

## @ai-sdk/gateway@2.0.0-beta.76

### Patch Changes

- 34ee8d0: feat (provider/gateway): add support for request-scoped byok

## @ai-sdk/langchain@2.0.0-beta.145

### Patch Changes

-   ai@6.0.0-beta.145

## @ai-sdk/llamaindex@2.0.0-beta.145

### Patch Changes

-   ai@6.0.0-beta.145

## @ai-sdk/react@3.0.0-beta.148

### Patch Changes

-   ai@6.0.0-beta.145

## @ai-sdk/rsc@2.0.0-beta.147

### Patch Changes

-   ai@6.0.0-beta.145

## @ai-sdk/svelte@4.0.0-beta.145

### Patch Changes

-   ai@6.0.0-beta.145

## @ai-sdk/vue@3.0.0-beta.145

### Patch Changes

-   ai@6.0.0-beta.145

Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
Adds documentation for tool execution approval in AI SDK 6.

Future:
- Update human in the loop recipe
- Add recipe for node
ben-vargas and others added 23 commits January 5, 2026 20:25
## Description

This PR adds documentation for the
[ai-sdk-provider-codex-cli](https://github.com/ben-vargas/ai-sdk-provider-codex-cli)
community provider, which enables using OpenAI's GPT-5 series models
through the Codex CLI.

## What does this PR do?

- Adds documentation for the Codex CLI provider at
`content/providers/03-community-providers/101-codex-cli.mdx`
- Updates the community providers list in
`content/docs/02-foundations/02-providers-and-models.mdx`

## Key Features

The Codex CLI provider offers access to OpenAI's latest models:
- **GPT-5 Model Families** - Support for gpt-5.2-codex,
gpt-5.1-codex-max, gpt-5.1-codex-mini, and legacy models
- **Reasoning Configuration** - Multiple effort levels from 'none' to
'xhigh'
- **Sandbox & Approval Modes** - Fine-grained control over tool
execution
- **Subscription Support** - Use ChatGPT Plus/Pro subscription or API
key authentication
- **Version Compatibility** - Works with AI SDK v6 and v5

## Notes

This provider is particularly useful for developers who have a ChatGPT
Plus/Pro subscription and want to use OpenAI's GPT-5 models with the
Vercel AI SDK without managing API keys separately.

## Testing

- [x] Documentation follows the existing community provider format
- [x] All installation methods (npm, pnpm, yarn, bun) are documented
- [x] Model capabilities table accurately reflects the provider's
features
- [x] Links to the provider repository are working
## Description

This PR updates documentation for the
[ai-sdk-provider-gemini-cli](https://github.com/ben-vargas/ai-sdk-provider-gemini-cli)
community provider to reflect AI SDK v6 compatibility and improvements.

## What does this PR do?

- Adds version compatibility table showing v6, v5, and v4 support with
correct NPM tags
- Updates installation commands with correct version specifiers
- Clarifies authentication options (6 auth types, with oauth-personal as
optional default)
- Moves verbose/logger settings to model settings section where they
belong
- Adds documentation for Gemini 3 model support (gemini-3-pro-preview,
gemini-3-flash-preview)
- Documents thinkingLevel configuration for Gemini 3 models

## Testing

- [x] Documentation follows the existing community provider format
- [x] All installation methods are documented with correct versions
- [x] Model capabilities table accurately reflects the provider's
features
- [x] Authentication methods are clearly documented with examples
- [x] Links to the provider repository are working
…#11458)

## Background

Anthropic introduced a breaking change in their API requiring that
sampling parameters use only `temperature` OR `top_p`, not both. This
aligns with their Claude 4 migration guidelines.

Previously, the AI SDK Anthropic provider would send both parameters to
the API when both were specified, which would result in an API error
with the new Anthropic API requirements.

See:
https://platform.claude.com/docs/en/about-claude/models/migrating-to-claude-4

## Summary

This PR implements mutual exclusivity between `temperature` and `topP`
parameters in the Anthropic provider:

**Changes:**
- Added validation logic that runs when thinking mode is NOT enabled
(thinking mode has its own parameter validation)
- When both `temperature` and `topP` are provided:
  - `temperature` takes priority
  - `topP` is set to `undefined` and excluded from the API request
- A warning is added: "topP is not supported when temperature is set.
topP is ignored."
- Updated existing tests to reflect the new behavior
- Added comprehensive test suite for temperature/topP mutual exclusivity

**Files Modified:**
- `packages/anthropic/src/anthropic-messages-language-model.ts` (lines
436-446)
- `packages/anthropic/src/anthropic-messages-language-model.test.ts`

## Manual Verification

1. **Test Suite Verification**: All 235 tests pass, including:
   - Existing tests updated to remove conflicting parameters
- New tests specifically for temperature/topP mutual exclusivity
scenarios
- Tests verify that thinking mode validation takes precedence (warnings
appear in correct order)

2. **Expected Behavior**:
   - When only `temperature` is provided → sends temperature to API ✅
   - When only `topP` is provided → sends topP to API ✅
- When both are provided → sends only temperature, warns about topP
being ignored ✅
- When thinking mode is enabled with both → thinking validation handles
all parameters ✅

## 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)

## Related Issues

Resolves the Anthropic API breaking change for Claude 4 parameter
requirements.
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.10

### Patch Changes

- ae26f95: Add missing `.catch()` handler to `executeToolCall` promise
in `runToolsTransformation` to prevent potential stream hang when the
promise rejects.

## @ai-sdk/amazon-bedrock@4.0.8

### Patch Changes

-   Updated dependencies [2231e84]
    -   @ai-sdk/anthropic@3.0.6

## @ai-sdk/angular@2.0.10

### Patch Changes

-   Updated dependencies [ae26f95]
    -   ai@6.0.10

## @ai-sdk/anthropic@3.0.6

### Patch Changes

- 2231e84: fix(anthropic): implement temperature/topP mutual exclusivity

Resolves the Anthropic API breaking change where sampling parameters
must use only `temperature` OR `top_p`, not both. When both parameters
are provided:

    -   Temperature takes priority and topP is ignored
- A warning is added to inform users: "topP is not supported when
temperature is set. topP is ignored."
- The validation only runs when thinking mode is not enabled (thinking
mode has its own parameter validation)

See Anthropic migration guide:
<https://platform.claude.com/docs/en/about-claude/models/migrating-to-claude-4>

## @ai-sdk/google-vertex@4.0.6

### Patch Changes

-   Updated dependencies [2231e84]
    -   @ai-sdk/anthropic@3.0.6

## @ai-sdk/langchain@2.0.10

### Patch Changes

-   Updated dependencies [ae26f95]
    -   ai@6.0.10

## @ai-sdk/llamaindex@2.0.10

### Patch Changes

-   Updated dependencies [ae26f95]
    -   ai@6.0.10

## @ai-sdk/mistral@3.0.4

### Patch Changes

-   45631ab: Update refrence_ids type to be union of number and string

## @ai-sdk/react@3.0.10

### Patch Changes

-   Updated dependencies [ae26f95]
    -   ai@6.0.10

## @ai-sdk/rsc@2.0.10

### Patch Changes

-   Updated dependencies [ae26f95]
    -   ai@6.0.10

## @ai-sdk/svelte@4.0.10

### Patch Changes

-   Updated dependencies [ae26f95]
    -   ai@6.0.10

## @ai-sdk/vue@3.0.10

### Patch Changes

-   Updated dependencies [ae26f95]
    -   ai@6.0.10

## @ai-sdk/xai@3.0.5

### Patch Changes

- e7f0a6f: fix(xai): add missing stream response schema and provider
tool name parsing

Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
## Background

When using `@ai-sdk/langchain` with LangGraph agents that have tools,
multi-turn conversations fail with:

```
400 An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'. The following tool_call_ids did not have response messages: call_xxxxx
```

The root cause is in `toUIMessageStream`'s handling of LangGraph
`values` events. When a `values` event contains the full message history
(including AIMessages with `tool_calls` from previous turns), the
adapter emits `tool-input-start` and `tool-input-available` events for
ALL historical tool calls, but does NOT emit corresponding
`tool-output-available` events for them.

This creates orphaned tool parts in the UIMessage with state
`input-available` (no output). When `toBaseMessages` converts these back
for the next request, it creates AIMessages with `tool_calls` but no
following ToolMessages, causing the OpenAI API error.

## Summary

Added a two-pass approach when processing `values` events in
`processLangGraphEvent`:

1. **First pass**: Collect all tool call IDs that have been responded to
by ToolMessages in the message history. These are "completed" historical
tool calls.

2. **Second pass**: When processing AIMessages with tool calls, skip
emitting events for any tool call that exists in the completed set.

This ensures that:
- Historical tool calls that already have ToolMessage responses are NOT
re-emitted
- Only new/current tool calls (those without ToolMessage responses yet)
are emitted
- The client's message history remains consistent without orphaned tool
parts

## Manual Verification

I double checked this resolution using the provided reproduction case
and was able to validate that all is working fine:

<img width="1624" height="1056" alt="Screenshot 2025-12-23 at 5 25
32 PM"
src="https://github.com/user-attachments/assets/94f08b19-2cb6-4bb7-8b46-8c3b2a3863d0"
/>


## Checklist

- [x] Tests have been added / updated (for bug fixes / features)
- [x] 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)

## Future Work

n/a

## Related Issues

Fixes vercel#11415
…l#11536)

## Background

xAI's Chat API returns `completion_tokens` that include both text and
reasoning tokens, matching OpenAI's o1 format. The SDK was treating this
value as text-only, causing incorrect calculations that resulted in
negative text token counts when reasoning tokens exceeded the
misinterpreted value.

## Summary

**Updated token calculation in `convert-xai-chat-usage.ts`:**
- `outputTokens.total`: `completion_tokens + reasoningTokens` →
`completion_tokens`
- `outputTokens.text`: `completion_tokens` → `completion_tokens -
reasoningTokens`

**Example:**
```typescript
// xAI API response
{
  completion_tokens: 95,  // includes both text (6) and reasoning (89)
  completion_tokens_details: { reasoning_tokens: 89 }
}

// Before: text = 6 - 89 = -83 ❌
// After:  text = 95 - 89 = 6 ✅
```

**Updated test cases:**
- Updated all tests in `convert-xai-chat-usage.test.ts` to reflect
correct xAI API format where `completion_tokens` includes reasoning
tokens
- Fixed 3 inline snapshots in `xai-chat-language-model.test.ts` for
reasoning model tests to match the corrected token calculation

**Added changeset** for the `@ai-sdk/xai` package to ensure proper
versioning.

## Manual Verification

Verified with reported scenario:
- Input: `completion_tokens: 95`, `reasoning_tokens: 89`
- Output: `text: 6`, `reasoning: 89`, `total: 95` (no negative values)
- All 126 tests passing (both node and edge environments)

## 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)

## Related Issues

- Fixes vercel#11487

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Lars Grammel <lars.grammel@gmail.com>
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/langchain@2.0.11

### Patch Changes

-   61ff058: fix(langchain): do not re-emit executed tool calls

Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
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/xai@3.0.6

### Patch Changes

- 77012ef: fix(xai): correct token counting for reasoning models to
prevent negative text_output_tokens

Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
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.11

### Patch Changes

-   Updated dependencies [8ec1984]
    -   @ai-sdk/gateway@3.0.8

## @ai-sdk/angular@2.0.11

### Patch Changes

-   ai@6.0.11

## @ai-sdk/gateway@3.0.8

### Patch Changes

-   8ec1984: fix(gateway): bump `@vercel/oidc` to 3.1.0

## @ai-sdk/langchain@2.0.12

### Patch Changes

-   ai@6.0.11

## @ai-sdk/llamaindex@2.0.11

### Patch Changes

-   ai@6.0.11

## @ai-sdk/react@3.0.11

### Patch Changes

-   ai@6.0.11

## @ai-sdk/rsc@2.0.11

### Patch Changes

-   ai@6.0.11

## @ai-sdk/svelte@4.0.11

### Patch Changes

-   ai@6.0.11

## @ai-sdk/vue@3.0.11

### Patch Changes

-   ai@6.0.11

Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
<!--
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
Prodia doesn't have an OpenAI-compatible API, so they need a provider
package

## Summary
Created it

## Manual Verification
Unit tests and example scripts

## Checklist

<!--
Do not edit this list. Leave items unchecked that don't apply. If you
need to track subtasks, create a new "## Tasks" section

Please check if the PR fulfills the following requirements:
-->

- [x] Tests have been added / updated (for bug fixes / features)
- [x] 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)

## Future Work

<!--
Feel free to mention things not covered by this PR that can be done in
future PRs.
Remove the section if it's not needed.
 -->

## Related Issues

<!--
List related issues here, e.g. "Fixes vercel#1234".
Remove the section if it's not needed.
-->

---------

Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
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/prodia@1.0.0

### Major Changes

-   bb3d30e: feat(provider/prodia): Create Prodia provider package

Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
…#11549)

## Summary
- Remove `gateway()` wrapper from all tool code examples in the tools
registry
- Update imports to remove `gateway` from `'ai'` package imports
- Update ctx-zip and perplexity-search examples to use `openai/gpt-5.2`

## Test plan
- [ ] Verify code examples render correctly on the tools registry page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
## Background

Attempting to use function tools with the `xai` provider `responses` api
fails with invalid json parse error on xai server side.

Sample error:
```
Failed to deserialize the JSON body into the target type: tools[0]: missing field `name` at line 1 column 496
```

## Summary

Revised format of function calls to use a flat format matching existing
openai responses api implementation.

The official xai docs do not seem to define the format to this level of
detail: https://docs.x.ai/docs/api-reference#create-new-response

## Manual Verification

Added example script to explicitly test tool calls with the responses
API. Fails before the change and passes after.
## Summary
add JSON parsing note to AGENTS.md
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/xai@3.0.7

### Patch Changes

-   23179aa: fix (provider/xai): use correct format for function tools

Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
## Background

The ability to run middleware on ImageModels to support semantic caching
or safety guardrails without requiring adhoc implementations is
desirable. Extend wrapProvider to accept newly created
ImageModelMiddleware for consistent implementation as
LanguageModelMiddleware

## Summary

- Added ImageModelV3Middleware to @ai-sdk/provider
(packages/provider/src/image-model-middleware/v3/image-model-v3-middleware.ts)

- Added wrapImageModel to ai
(packages/ai/src/middleware/wrap-image-model.ts) and
ImageModelMiddleware alias
(packages/ai/src/types/image-model-middleware.ts).

- Extended middleware plumbing to support images in wrapProvider
(packages/ai/src/middleware/wrap-provider.ts) and createProviderRegistry
(packages/ai/src/registry/provider-registry.ts).

- Tests: new wrapImageModel suite
(packages/ai/src/middleware/wrap-image-model.test.ts) + updated
registry/provider wrapper tests.

- Docs: added Image Middleware section
(content/docs/03-ai-sdk-core/35-image-generation.mdx), new reference
page (content/docs/07-reference/01-ai-sdk-core/61-wrap-image-model.mdx)

## Manual Verification

Manually built and implemented migrated our existing middleware approach
to use new middleware implementation

## Checklist

- [x] Tests have been added / updated (for bug fixes / features)
- [x] 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)

## Future Work

Create a `defaultImageSettingsMiddleware` to be used for reference
implementation.

Extend wrapProvider to accept wrapping embedding models too

## Related Issues

Resolves vercel#11546
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.12

### Patch Changes

- d937c8f: Add Image model middleware support via `wrapImageModel` and
`ImageModelV3Middleware`.
-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/gateway@3.0.9
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/amazon-bedrock@4.0.9

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/anthropic@3.0.7
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/angular@2.0.12

### Patch Changes

-   Updated dependencies [d937c8f]
    -   ai@6.0.12
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/anthropic@3.0.7

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/assemblyai@2.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/azure@3.0.5

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/openai@3.0.5
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/baseten@1.0.5

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/openai-compatible@2.0.4
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/black-forest-labs@1.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/cerebras@2.0.5

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/openai-compatible@2.0.4
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/cohere@3.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/deepgram@2.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/deepinfra@2.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/openai-compatible@2.0.4
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/deepseek@2.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/devtools@0.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2

## @ai-sdk/elevenlabs@2.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/fal@2.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/fireworks@2.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/openai-compatible@2.0.4
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/gateway@3.0.9

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/gladia@2.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/google@3.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/google-vertex@4.0.7

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/anthropic@3.0.7
    -   @ai-sdk/google@3.0.4
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/groq@3.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/huggingface@1.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/openai-compatible@2.0.4
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/hume@2.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/langchain@2.0.13

### Patch Changes

-   Updated dependencies [d937c8f]
    -   ai@6.0.12

## @ai-sdk/llamaindex@2.0.12

### Patch Changes

-   Updated dependencies [d937c8f]
    -   ai@6.0.12

## @ai-sdk/lmnt@2.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/luma@2.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/mcp@1.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/mistral@3.0.5

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/openai@3.0.5

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/openai-compatible@2.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/perplexity@3.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/prodia@1.0.1

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/provider@3.0.2

### Patch Changes

- d937c8f: Add Image model middleware support via `wrapImageModel` and
`ImageModelV3Middleware`.

## @ai-sdk/provider-utils@4.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2

## @ai-sdk/react@3.0.12

### Patch Changes

-   Updated dependencies [d937c8f]
    -   ai@6.0.12
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/replicate@2.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/revai@2.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/rsc@2.0.12

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   ai@6.0.12
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/svelte@4.0.12

### Patch Changes

-   Updated dependencies [d937c8f]
    -   ai@6.0.12
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/togetherai@2.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/openai-compatible@2.0.4
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/valibot@2.0.4

### Patch Changes

-   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/vercel@2.0.4

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/openai-compatible@2.0.4
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/vue@3.0.12

### Patch Changes

-   Updated dependencies [d937c8f]
    -   ai@6.0.12
    -   @ai-sdk/provider-utils@4.0.4

## @ai-sdk/xai@3.0.8

### Patch Changes

-   Updated dependencies [d937c8f]
    -   @ai-sdk/provider@3.0.2
    -   @ai-sdk/openai-compatible@2.0.4
    -   @ai-sdk/provider-utils@4.0.4

Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
…h tool (vercel#10765)

## Background

streamText was throwing a validation error when using the x_search tool
because some event types returned by xAI were missing from the
`xaiResponsesChunkSchema`

## Summary

I updated the chunkSchema with the missing types and also added a test
in `packages/xai/src/responses/xai-responses-language-model.test.ts`

## Manual Verification

I tested it by running the xai-x-search-video-understanding example


## Related Issues

fixes vercel#10628

Co-authored-by: josh <josh@afterima.ge>
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/xai@3.0.9

### Patch Changes

-   173dcfd: added support for streaming custom tool input chunks in xAI

Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
- Merged 987 commits from vercel/ai upstream
- Preserved @zenning/* package renames (ai, openai, provider, react)
- Re-applied multi-message stream support
- Re-applied file-search optional query documentation fix
@callycodes callycodes merged commit a88997d into main Jan 8, 2026
1 of 13 checks passed
Sign up for free to 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.