Skip to content

fix: use openai key for Azure provider options#20333

Closed
ToastyTheBot wants to merge 5 commits intoanomalyco:devfrom
ToastyTheBot:fix/issue-20275-azure-options
Closed

fix: use openai key for Azure provider options#20333
ToastyTheBot wants to merge 5 commits intoanomalyco:devfrom
ToastyTheBot:fix/issue-20275-azure-options

Conversation

@ToastyTheBot
Copy link
Copy Markdown

Summary

  • Fixes model options like reasoningEffort being silently ignored for custom Azure providers
  • @ai-sdk/azure delegates to OpenAIChatLanguageModel which hardcodes provider: 'openai' in parseProviderOptions
  • Options were being placed under 'azure' key and silently dropped

Changes

  • Updated providerOptions in src/provider/transform.ts to use 'openai' key for @ai-sdk/azure

Test plan

  • Configure custom Azure provider with model-level reasoningEffort option
  • Send request and verify reasoning_effort appears in HTTP request body

Fixes #20275

claude added 5 commits April 1, 2026 02:36
…leakage

When generating session titles, the user's model variant (e.g., "max" which
maps to output_config.effort) was leaking into the LLM.stream call for the
title agent. Since the title agent uses a small model (e.g., haiku) that does
not support the effort parameter, this caused a 400 error from the Anthropic
API that was silently swallowed by Effect.ignore.

This fix strips the variant from the user info when calling LLM.stream for
title generation, ensuring the small model receives only compatible parameters.

Fixes anomalyco#20269
When a custom provider uses npm: "@ai-sdk/azure", the getLanguage function
was falling back to sdk.languageModel() which bypasses the useCompletionUrls
option check. This caused the Azure provider to use the /responses endpoint
instead of /chat/completions even when useCompletionUrls was set to true.

The fix adds a check in getLanguage to apply Azure-specific logic for any
model using @ai-sdk/azure, ensuring useCompletionUrls is respected for both
built-in and custom Azure providers.

Fixes anomalyco#20287
The protocol version 2024-11-05 is deprecated and rejected by GitLab 18.9+.
Updated to 2025-06-18 which is supported by GitLab MCP server.
The mcp auth and mcp debug commands were not forwarding headers configured
under mcp.<name>.headers during the OAuth flow, causing 404 errors instead
of 401 from servers requiring custom headers for routing.

Fixed three code paths:
1. startAuth in src/mcp/index.ts - added requestInit with headers
2. McpDebugCommand fetch probe - added headers to fetch call
3. McpDebugCommand OAuth transport - added requestInit with headers

Fixes anomalyco#20286
@ai-sdk/azure delegates to OpenAIChatLanguageModel which hardcodes
provider: 'openai' in parseProviderOptions. Model options like
reasoningEffort were being placed under 'azure' key and silently ignored.

Now using 'openai' key for @ai-sdk/azure provider options.

Fixes anomalyco#20275
@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Mar 31, 2026
@github-actions
Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found

PR #20272 - "fix: use 'openai' as providerOptions key for @ai-sdk/azure"
#20272

This PR appears to be addressing the exact same issue as the current PR #20333. Both are fixing the Azure provider options configuration by using the 'openai' key instead of 'azure' for the providerOptions in the transform.ts file. This is likely a duplicate that was already submitted or in progress.

@rekram1-node
Copy link
Copy Markdown
Collaborator

denounce

@rekram1-node
Copy link
Copy Markdown
Collaborator

Sorry dont want bots spamming prs.

opencode-agent bot pushed a commit that referenced this pull request Mar 31, 2026
opencode-agent bot pushed a commit that referenced this pull request Mar 31, 2026
jeromelau pushed a commit to jeromelau/opencode that referenced this pull request Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:compliance This means the issue will auto-close after 2 hours.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Azure provider: reasoningEffort model option silently ignored

3 participants