fix(google-vertex): allow 'vertex' as a key for providerOptions#10983
Merged
aayush-kapoor merged 14 commits intomainfrom Dec 11, 2025
Merged
fix(google-vertex): allow 'vertex' as a key for providerOptions#10983aayush-kapoor merged 14 commits intomainfrom
aayush-kapoor merged 14 commits intomainfrom
Conversation
lgrammel
reviewed
Dec 9, 2025
lgrammel
reviewed
Dec 9, 2025
lgrammel
reviewed
Dec 9, 2025
lgrammel
reviewed
Dec 9, 2025
lgrammel
reviewed
Dec 10, 2025
Collaborator
|
Please add to migration guide. Are any changes to the google vertex provider docs necessary? |
lgrammel
approved these changes
Dec 10, 2025
Collaborator
Author
|
added a migration guide - will be adding codemods in a follow up PR once this lands |
3 tasks
aayush-kapoor
added a commit
that referenced
this pull request
Dec 11, 2025
…e-vertex (#11049) ## Background Follow up to PR #10983 ## Summary Added codemods for the breaking change highlighted in the migration guide of the PR. ## Manual Verification Tests and fixtures were added ## 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)
4 tasks
lgrammel
pushed a commit
that referenced
this pull request
Jan 5, 2026
…11073) ## Background When using Azure OpenAI reasoning models via the Responses API, the SDK currently only handles reasoning parts when their `providerOptions` live under the `openai` key. Azure Responses, however, expose reasoning parts and `providerMetadata` under the `azure` namespace. This mismatch causes the SDK to log a warning about "non-OpenAI reasoning parts" and drop encrypted reasoning traces instead of passing them through to the client. See #10917. ## Summary This PR makes the Responses provider options handling in `@ai-sdk/openai` configurable and switches Azure Responses to use `providerOptions.azure` so that reasoning parts and `providerMetadata` stay in sync. Concretely: - **OpenAI provider** Extend the Responses input conversion so that the provider options key (`openai`, `azure`, etc.) is configurable instead of being hard-coded to `openai`. Keep the existing OpenAI behavior unchanged by continuing to use the `openai` key by default. - **Azure provider** Update the Azure Responses integration to use the `azure` provider key when reading/writing Responses `providerOptions`. However, to maintain backward compatibility, `providerOptions.openai` remains available. This makes Azure reasoning parts and `providerMetadata.azure` consistent and prevents encrypted reasoning traces from being treated as unsupported "non-OpenAI reasoning". - **Docs & migration** Update the Azure provider docs to explain that the Responses API now available `providerOptions.azure` `providerOptions.openai` and returns `providerMetadata.azure`. Add a migration note to the 6.0 migration guide describing the change from `openai` → `azure` for Azure Responses. - `content/providers/01-ai-sdk-providers/04-azure.mdx` - `content/docs/08-migration-guides/24-migration-guide-6-0.mdx` - **Examples & tests** - Add ai-core examples for `reasoning.encrypted_content` for both OpenAI and Azure Responses. - Update existing Azure examples to use `providerOptions.azure` for Responses. - Add fixtures and tests to cover Azure/OpenAI Responses with encrypted reasoning, ensuring we don’t regress on this behavior. - `packages/azure/src/__fixtures__/azure-reasoning-encrypted-content.1.chunks.txt` - `packages/azure/src/__fixtures__/azure-reasoning-encrypted-content.1.json` - `packages/openai/src/responses/__fixtures__/openai-reasoning-encrypted-content.1.chunks.txt` - `packages/openai/src/responses/__fixtures__/openai-reasoning-encrypted-content.1.json` - add test case. - `packages/openai/src/responses/convert-to-openai-responses-input.ts` - `packages/openai/src/responses/openai-responses-language-model.test.ts` ## Manual Verification - new tests in `examples/ai-core` - `pnpm tsx src/generate-text/azure-reasoning-encrypted-content.ts` - `pnpm tsx src/generate-text/openai-reasoning-encrypted-content.ts` - `pnpm tsx src/generate-text/azure-provider-options-name-openai-compatible.ts` - `pnpm tsx src/stream-text/azure-reasoning-encrypted-content.ts` - `pnpm tsx src/stream-text/openai-reasoning-encrypted-content.ts` - `pnpm tsx src/stream-text/azure-provider-options-name-openai-compatible.ts` - fix existing tests and re-try in `examples/ai-core`. - `pnpm tsx src/generate-text/azure-image.ts ` - `pnpm tsx src/generate-text/azure-responses-reasoning-summary.ts` - `pnpm tsx src/stream-text/azure-fullstream-logprobs.ts` - `pnpm tsx src/stream-text/azure-responses-reasoning-summary.ts` - fix existing tests and re-try in `examples/next-openai`. - `pnpm run dev` & `http://localhost:3000/test-azure-code-interpreter-annotation-download` (fix examples/next-openai/app/api/chat-azure-code-interpreter-annotation-download/route.ts) ## Related Issues Fixes #10917. Reference #10983. fix(google-vertex): allow 'vertex' as a key for providerOptions --------- Co-authored-by: tsuzaki430 <tsuzaki430@users.noreply.github.com>
4 tasks
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
#7783
When providerOptions are defined in the vertex provider with the key
vertex, they are ignored and not sent in the request to the model; they only work withgooglekey.Summary
Allow the
vertexto be a valid key for setting providerOptions for vertex provider for consistency sakeManual Verification
test cases added
Checklist
pnpm changesetin the project root)Future Work
Need to add codemods for the changes in the migration guide
Related Issues
Fixes #7783