Repository navigation
Comparing changes
Open a pull request
base repository: vercel/ai
base: @ai-sdk/mcp@1.0.81
head repository: vercel/ai
compare: @ai-sdk/mcp@1.0.82
- 15 commits
- 92 files changed
- 5 contributors
Commits on Sep 16, 2026
-
Backport: chore(provider/gateway): update gateway model settings file…
…s v6 (#20841) Automated update of the gateway model settings files. Regenerated from the upstream gateway model list by [`update-model-settings.yml`](https://github.com/vercel/ai/blob/main/.github/workflows/update-model-settings.yml) ([this run](https://github.com/vercel/ai/actions/runs/35121093565)). Merging this PR is what surfaces newly-released gateway models as IDE autocomplete suggestions when users type a model string with `@ai-sdk/gateway`. See the workflow file for details on cadence and scope. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 88d0bad - Browse repository at this point
Copy the full SHA 88d0badView commit details -
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 release-v6.0, this PR will be updated. # Releases ## ai@6.0.285 ### Patch Changes - Updated dependencies [88d0bad] - @ai-sdk/gateway@3.0.196 ## @ai-sdk/angular@2.0.286 ### Patch Changes - ai@6.0.285 ## @ai-sdk/gateway@3.0.196 ### Patch Changes - 88d0bad: Backport: chore(provider/gateway): update gateway model settings files ## @ai-sdk/langchain@2.0.293 ### Patch Changes - ai@6.0.285 ## @ai-sdk/llamaindex@2.0.285 ### Patch Changes - ai@6.0.285 ## @ai-sdk/react@3.0.288 ### Patch Changes - ai@6.0.285 ## @ai-sdk/rsc@2.0.285 ### Patch Changes - ai@6.0.285 ## @ai-sdk/svelte@4.0.285 ### Patch Changes - ai@6.0.285 ## @ai-sdk/vue@3.0.285 ### Patch Changes - ai@6.0.285 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 138f6b7 - Browse repository at this point
Copy the full SHA 138f6b7View commit details
Commits on Sep 17, 2026
-
Backport: feat(alibaba): support preserved thinking in multi-turn req…
…uests (#20903) This is an automated backport of #20871 to the release-v6.0 branch. FYI @shaper This backport has conflicts that need to be resolved manually. ### `git cherry-pick` output ``` Auto-merging content/providers/01-ai-sdk-providers/32-alibaba.mdx Auto-merging packages/alibaba/README.md Auto-merging packages/alibaba/src/alibaba-chat-language-model.test.ts Auto-merging packages/alibaba/src/alibaba-chat-language-model.ts CONFLICT (content): Merge conflict in packages/alibaba/src/alibaba-chat-language-model.ts Auto-merging packages/alibaba/src/alibaba-chat-options.ts Auto-merging packages/alibaba/src/alibaba-chat-prompt.ts Auto-merging packages/alibaba/src/convert-to-alibaba-chat-messages.test.ts CONFLICT (content): Merge conflict in packages/alibaba/src/convert-to-alibaba-chat-messages.test.ts Auto-merging packages/alibaba/src/convert-to-alibaba-chat-messages.ts CONFLICT (content): Merge conflict in packages/alibaba/src/convert-to-alibaba-chat-messages.ts error: could not apply 7f803af... feat(alibaba): support preserved thinking in multi-turn requests (#20871) hint: After resolving the conflicts, mark them with hint: "git add/rm <pathspec>", then run hint: "git cherry-pick --continue". hint: You can instead skip this commit with "git cherry-pick --skip". hint: To abort and get back to the state before "git cherry-pick", hint: run "git cherry-pick --abort". hint: Disable this message with "git config set advice.mergeConflict false" ``` Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for def3cdf - Browse repository at this point
Copy the full SHA def3cdfView commit details -
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 release-v6.0, this PR will be updated. # Releases ## @ai-sdk/alibaba@1.0.55 ### Patch Changes - def3cdf: feat(alibaba): preserve reasoning in multi-turn requests by default on supported models Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 7c8d247 - Browse repository at this point
Copy the full SHA 7c8d247View commit details -
[v6.0] fix: Preserve uploaded-file references in OpenAI Responses too…
…l results (#21008) ## Background OpenAI Responses omitted provider-referenced PDF and image files from tool results, preventing models from receiving files returned by tools. ## Root Cause The tool-result converter handled inline data and URLs but had no provider-reference branch, and its function output type lacked file_id variants; the original replay confirmed references became empty output arrays with unsupported-content warnings. ## Summary Resolved tool-result provider references into input_file or input_image file_id content, updated internal request types, removed reproduction artifacts, and added a patch changeset. ## Testing Added regression coverage for mixed text, PDF references, image references, image detail, prompt cache breakpoints, and warning-free conversion. ## End-to-end Validation - `replay_original_reproduction`: completed with exit code 0 and no original bug signal. - `pnpm -C examples/ai-functions exec tsx -e '<live uploaded-image tool-result validation>'`: OpenAI returned `Cat` with no warnings, and the uploaded file was deleted successfully. ## Related Issues Fixes #20971 Closes #21002 Backport of #20978 --------- Co-authored-by: ai-sdk-factory[bot] <305873210+ai-sdk-factory[bot]@users.noreply.github.com> Co-authored-by: ai-sdk-factory <308175966+ai-sdk-factory@users.noreply.github.com> Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for e53d917 - Browse repository at this point
Copy the full SHA e53d917View commit details -
[v6.0] fix: preserve text provider metadata in simulated streaming re…
…sults and response history (#21007) ## Background Simulated text streaming lost per-part provider metadata from final content, response history, and continuation prompts. ## Root Cause The text branch of simulateStreamingMiddleware created text stream events without the generated part's providerMetadata, so stream accumulation could not retain it; the immutable reproduction confirmed the metadata disappeared while reasoning metadata survived. ## Summary Forwarded generated text providerMetadata on simulated text-start events and added a patch changeset for ai. ## Testing Added regression coverage verifying provider metadata remains in streamed content and is mapped to providerOptions in response messages. ## End-to-end Validation - Immutable `pnpm -C examples/ai-functions exec tsx src/reproduction/simulate-streaming-text-provider-metadata.ts` replay exited successfully and retained metadata in content, response history, and the continuation prompt. ## Related Issues Fixes #20970 Closes #20999 Backport of #20977 --------- Co-authored-by: ai-sdk-factory[bot] <305873210+ai-sdk-factory[bot]@users.noreply.github.com> Co-authored-by: ai-sdk-factory <308175966+ai-sdk-factory@users.noreply.github.com> Co-authored-by: brennanbutler01 <64561607+brennanbutler01@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 8a9722e - Browse repository at this point
Copy the full SHA 8a9722eView commit details -
[v6.0] fix: cancel prompt attachment downloads when calls are aborted…
… or time out (#21006) ## Background Canceled or timed-out AI SDK calls could remain pending indefinitely while downloading unsupported prompt attachment URLs. ## Root Cause Prompt conversion did not receive the call's effective abort signal, and the default download function therefore invoked the lower-level downloader without a signal. The original reproduction confirmed that all 24 downloads lacked signals before the change. ## Summary Threaded effective abort signals through every prompt-conversion call site and into SDK-owned attachment downloads, without changing custom download behavior. Added an ai package patch changeset and removed reproduction-only artifacts. ## Testing Added regression tests covering caller cancellation for generateText and streamText, total timeout cancellation, signal forwarding, and prevention of model invocation after cancellation. ## End-to-end Validation - `pnpm -C examples/ai-functions exec tsx src/reproduction/issue-20965.ts` via immutable replay: exited successfully; 0/24 cancellation cases remained pending, every download received a signal, and no model was invoked before cancellation. ## Related Issues Fixes #20965 Closes #20998 Backport of #20968 --------- Co-authored-by: ai-sdk-factory[bot] <305873210+ai-sdk-factory[bot]@users.noreply.github.com> Co-authored-by: ai-sdk-factory <308175966+ai-sdk-factory@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for b2ad994 - Browse repository at this point
Copy the full SHA b2ad994View commit details -
[v6.0] fix: preserve null and empty-string values in structured parti…
…al output streams (#21013) ## Background Structured JSON streaming omitted valid null and empty-string values from partialOutputStream, although final output resolved correctly. ## Root Cause The stream getter treated null as missing by using a nullish check, while duplicate suppression initialized its comparison state to an empty string, causing the first empty-string output to appear already published. The reproduction confirmed both paths affected streamText and ToolLoopAgent.stream. ## Summary Distinguished undefined from valid null output and tracked whether a partial value was previously published independently of its serialized value. Added an ai package patch changeset. ## Testing Added regression coverage verifying that Output.json() streams null and empty-string values while preserving the correct final output. ## End-to-end Validation - `replay_original_reproduction`: the immutable streamText and ToolLoopAgent.stream reproduction completed successfully without the original bug signal. ## Related Issues Fixes #20962 Closes #21010 Backport of #20973 --------- Co-authored-by: ai-sdk-factory[bot] <305873210+ai-sdk-factory[bot]@users.noreply.github.com> Co-authored-by: ai-sdk-factory <308175966+ai-sdk-factory@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 9c85bd4 - Browse repository at this point
Copy the full SHA 9c85bd4View commit details -
[v6.0] fix: preserve structured output streaming when earlier tool st…
…eps emit text (#21018) ## Background Structured outputs could resolve successfully after a tool loop while partialOutputStream and array elementStream emitted nothing if an earlier step contained text. ## Root Cause createOutputTransformStream retained its selected text ID, accumulated text, metadata, and last published value across step boundaries. The reproduction confirmed that earlier-step prose caused final-step JSON to be skipped or parsed with stale state; resetting this state at each start-step restored every failing case. ## Summary Reset structured-output parsing state at each tool-loop step boundary, retained retry isolation, removed reproduction-only artifacts, and added an ai patch changeset. ## Testing Added object and array regression tests covering earlier-step text, final structured partials, completed array elements, and resolved output. ## End-to-end Validation - `replay_original_reproduction` (`pnpm -C examples/ai-functions exec tsx src/reproduction/issue-20961-partial-output-across-tool-steps.ts`) exited 0; all streamText and ToolLoopAgent object/array cases emitted the expected partials and elements. ## Related Issues Fixes #20961 Closes #21012 Backport of #20972 --------- Co-authored-by: ai-sdk-factory[bot] <305873210+ai-sdk-factory[bot]@users.noreply.github.com> Co-authored-by: ai-sdk-factory <308175966+ai-sdk-factory@users.noreply.github.com> Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for becaa32 - Browse repository at this point
Copy the full SHA becaa32View commit details -
[v6.0] fix: preserve originating tool calls when pruning histories wi…
…th pending approval responses (#21023) ## Background Published `ai` package behavior produced invalid pruned histories: retained pending approval decisions lost their originating tool call, causing text and agent APIs to throw before tool or model execution. ## Root Cause `pruneMessages` tracked retained approval IDs separately from retained tool-call IDs. A trailing approval response preserved its request by approval ID but never traced the request's `toolCallId`, so the originating call was pruned; the reproduction and failing regression test confirmed this path. ## Summary Added approval-to-tool-call tracing so retained approvals also retain their originating calls, added regression coverage for general and selective pruning, and added an `ai` patch changeset. ## Testing Added a regression test covering pending approval histories under `before-last-message` and selective tool pruning. ## End-to-end Validation - `replay_original_reproduction` (`pnpm -C examples/ai-functions exec tsx src/reproduction/issue-20953-prune-pending-approval.ts`) — exited successfully and all 36 approval scenarios passed. ## Related Issues Fixes #20953 Closes #21017 Backport of #20958 Co-authored-by: ai-sdk-factory[bot] <305873210+ai-sdk-factory[bot]@users.noreply.github.com> Co-authored-by: ai-sdk-factory <308175966+ai-sdk-factory@users.noreply.github.com> Co-authored-by: brennanbutler01 <64561607+brennanbutler01@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 4d91999 - Browse repository at this point
Copy the full SHA 4d91999View commit details -
[v6.0] fix: Prevent redundant legacy SSE OAuth refreshes for concurre…
…nt or late stale-token 401 responses (#21028) ## Background Legacy SSE message requests redundantly refreshed OAuth tokens when concurrent or delayed requests returned 401 responses for the same stale bearer token. ## Root Cause SseMCPTransport called auth() independently for every eligible 401 and did not check whether the rejected request used an outdated token; deterministic concurrent and after-save scenarios therefore produced two refresh exchanges. ## Summary Added transport-level OAuth recovery coordination and retry-with-current-token handling, removed reproduction-only artifacts, and added a patch changeset for @ai-sdk/mcp. ## Testing Added legacy SSE regression tests covering simultaneous 401 responses and a delayed stale 401 received after refreshed tokens were saved. ## End-to-end Validation - `pnpm -C examples/ai-functions exec tsx src/reproduction/mcp-sse-concurrent-oauth-refresh.ts` via immutable replay completed successfully with one refresh in both race scenarios and no bug signal. ## Related Issues Fixes #20940 Closes #21022 Backport of #20943 --------- Co-authored-by: ai-sdk-factory[bot] <305873210+ai-sdk-factory[bot]@users.noreply.github.com> Co-authored-by: ai-sdk-factory <308175966+ai-sdk-factory@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 1620182 - Browse repository at this point
Copy the full SHA 1620182View commit details -
[v6.0] fix: report the model selected by prepareStep in streamed step…
… results and callbacks (#21026) ## Background streamText called the model selected by prepareStep but mislabeled completed steps and callbacks with the original model. ## Root Cause The streaming event processor constructed DefaultStepResult and warning metadata from the outer model even though each call used the resolved stepModel; the reproduction confirmed model B was called while steps, onStepEnd, and onEnd reported model A. ## Summary Tracked the resolved model for each streaming step and used it when constructing completed-step metadata and logging warnings. Added a patch changeset and removed reproduction-only artifacts. ## Testing Expanded streamText regression coverage to verify prepareStep model changes across step-start events, step-end callbacks, returned steps, and onEnd data. ## End-to-end Validation - `replay_original_reproduction` (`pnpm -C examples/ai-functions exec tsx src/reproduction/issue-20944-stream-text-prepare-step-model.ts`) completed successfully with every streamText and ToolLoopAgent case reporting model B and no mismatches. ## Related Issues Fixes #20944 Closes #21016 Backport of #20946 --------- Co-authored-by: ai-sdk-factory[bot] <305873210+ai-sdk-factory[bot]@users.noreply.github.com> Co-authored-by: ai-sdk-factory <308175966+ai-sdk-factory@users.noreply.github.com> Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 6a0f2d9 - Browse repository at this point
Copy the full SHA 6a0f2d9View commit details
Commits on Sep 18, 2026
-
[v6.0] fix: prevent unhandled rejections when UI message stream readi…
…ng stops early (#21036) ## Background Breaking iteration or cancelling a reader from the published readUIMessageStream API could produce an unhandled closed-controller rejection and terminate Node.js processes. ## Root Cause Output cancellation closed the output controller while an unobserved background consumer continued processing, allowing later writes or final closure to target the closed controller. The original reproduction confirmed ERR_INVALID_STATE for early exits, and the immutable replay now confirms the failure is gone. ## Summary The PR tracks output cancellation synchronously, aborts background input consumption, suppresses writes and final closure after cancellation, adds two regression tests, and includes an ai patch changeset. No dependencies or configuration were changed. ## Testing Node and Edge regression coverage verifies cancellation propagation for iterator break and explicit reader cancellation. The focused tests passed repeatedly, and the full repository tests, full type check, formatting, and lint checks passed. ## End-to-end Validation - `replay_original_reproduction`: exited 0 with no unhandled rejection or original failure signal; classified as `no-longer-reproduces`. ## Related Issues Fixes #20991 Closes #21003 Backport of #20994 Co-authored-by: ai-sdk-factory[bot] <305873210+ai-sdk-factory[bot]@users.noreply.github.com> Co-authored-by: ai-sdk-factory <308175966+ai-sdk-factory@users.noreply.github.com> Co-authored-by: brennanbutler01 <64561607+brennanbutler01@users.noreply.github.com> Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for db02971 - Browse repository at this point
Copy the full SHA db02971View commit details -
[v6.0] fix: preserve Amazon Bedrock API error messages when the error…
… type is omitted (#21041) ## Background Amazon Bedrock responses without a body-level error type were exposed to consumers as "undefined: <message>" in streaming chat, embedding, image, and reranking calls. ## Root Cause Four handlers unconditionally interpolated the nullish AmazonBedrockErrorSchema.type field; the immutable reproduction confirmed all four produced the literal "undefined:" prefix. ## Summary Added a shared Bedrock failed-response handler that conditionally includes the error type, adopted it across the affected handlers, removed reproduction artifacts, and added a patch changeset. ## Testing Added regression tests covering error bodies both with and without a type, preserving typed prefixes while returning unprefixed messages when type is absent. ## End-to-end Validation - `replay_original_reproduction`: original streaming chat, embedding, image, and reranking reproduction exited successfully without the bug signal. - `pnpm -C examples/ai-functions exec tsx src/reproduction/amazon-bedrock-error-message-live.ts`: live AWS Bedrock request returned `The provided model identifier is invalid.` without an `undefined:` prefix. ## Related Issues Fixes #20926 Closes #21038 Backport of #20933 --------- Co-authored-by: ai-sdk-factory[bot] <305873210+ai-sdk-factory[bot]@users.noreply.github.com> Co-authored-by: ai-sdk-factory <308175966+ai-sdk-factory@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 96b6d3f - Browse repository at this point
Copy the full SHA 96b6d3fView commit details -
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 release-v6.0, this PR will be updated. # Releases ## ai@6.0.286 ### Patch Changes - 8a9722e: fix(ai): preserve provider metadata when simulating text streams - 6a0f2d9: fix(ai): report the prepareStep model in streamed step results - db02971: fix(ai): prevent unhandled rejections when UI message stream reading stops early - 4d91999: fix(ai): preserve tool calls required by retained pending approvals - b2ad994: fix(ai): cancel prompt attachment downloads when model calls are aborted or time out - 9c85bd4: fix(ai): stream null and empty string JSON partial outputs - becaa32: fix(ai): stream structured output from the final tool-loop step ## @ai-sdk/amazon-bedrock@4.0.178 ### Patch Changes - 96b6d3f: fix(amazon-bedrock): preserve API error messages when the error type is omitted - Updated dependencies [e53d917] - @ai-sdk/openai@3.0.114 ## @ai-sdk/angular@2.0.287 ### Patch Changes - Updated dependencies [8a9722e] - Updated dependencies [6a0f2d9] - Updated dependencies [db02971] - Updated dependencies [4d91999] - Updated dependencies [b2ad994] - Updated dependencies [9c85bd4] - Updated dependencies [becaa32] - ai@6.0.286 ## @ai-sdk/azure@3.0.122 ### Patch Changes - Updated dependencies [e53d917] - @ai-sdk/openai@3.0.114 ## @ai-sdk/langchain@2.0.294 ### Patch Changes - Updated dependencies [8a9722e] - Updated dependencies [6a0f2d9] - Updated dependencies [db02971] - Updated dependencies [4d91999] - Updated dependencies [b2ad994] - Updated dependencies [9c85bd4] - Updated dependencies [becaa32] - ai@6.0.286 ## @ai-sdk/llamaindex@2.0.286 ### Patch Changes - Updated dependencies [8a9722e] - Updated dependencies [6a0f2d9] - Updated dependencies [db02971] - Updated dependencies [4d91999] - Updated dependencies [b2ad994] - Updated dependencies [9c85bd4] - Updated dependencies [becaa32] - ai@6.0.286 ## @ai-sdk/mcp@1.0.82 ### Patch Changes - 1620182: fix(mcp): avoid duplicate legacy SSE OAuth refreshes for stale 401 responses ## @ai-sdk/openai@3.0.114 ### Patch Changes - e53d917: fix(openai): preserve provider file references in Responses tool results ## @ai-sdk/react@3.0.289 ### Patch Changes - Updated dependencies [8a9722e] - Updated dependencies [6a0f2d9] - Updated dependencies [db02971] - Updated dependencies [4d91999] - Updated dependencies [b2ad994] - Updated dependencies [9c85bd4] - Updated dependencies [becaa32] - ai@6.0.286 ## @ai-sdk/rsc@2.0.286 ### Patch Changes - Updated dependencies [8a9722e] - Updated dependencies [6a0f2d9] - Updated dependencies [db02971] - Updated dependencies [4d91999] - Updated dependencies [b2ad994] - Updated dependencies [9c85bd4] - Updated dependencies [becaa32] - ai@6.0.286 ## @ai-sdk/svelte@4.0.286 ### Patch Changes - Updated dependencies [8a9722e] - Updated dependencies [6a0f2d9] - Updated dependencies [db02971] - Updated dependencies [4d91999] - Updated dependencies [b2ad994] - Updated dependencies [9c85bd4] - Updated dependencies [becaa32] - ai@6.0.286 ## @ai-sdk/vue@3.0.286 ### Patch Changes - Updated dependencies [8a9722e] - Updated dependencies [6a0f2d9] - Updated dependencies [db02971] - Updated dependencies [4d91999] - Updated dependencies [b2ad994] - Updated dependencies [9c85bd4] - Updated dependencies [becaa32] - ai@6.0.286 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 38f42fc - Browse repository at this point
Copy the full SHA 38f42fcView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff @ai-sdk/mcp@1.0.81...@ai-sdk/mcp@1.0.82