Skip to content

fix: omit unsupported GPT-5 chat params for Azure Foundry custom providers#27949

Closed
itzAmrit wants to merge 1 commit into
anomalyco:devfrom
itzAmrit:codex/azure-foundry-gpt5-chat-params
Closed

fix: omit unsupported GPT-5 chat params for Azure Foundry custom providers#27949
itzAmrit wants to merge 1 commit into
anomalyco:devfrom
itzAmrit:codex/azure-foundry-gpt5-chat-params

Conversation

@itzAmrit
Copy link
Copy Markdown

@itzAmrit itzAmrit commented May 16, 2026

Refs #27948

This strips the GPT-5 chat parameters that Azure Foundry rejects when a custom provider uses @ai-sdk/openai-compatible against an Azure host.

What changed:

  • omit max_tokens by clearing maxOutputTokens
  • omit reasoningSummary for the same Azure OpenAI-compatible GPT-5 path
  • add a plugin regression test for Azure hosts

Verification:

  • bun --cwd packages/opencode test test/plugin/azure.test.ts test/plugin/cloudflare.test.ts
  • repo pre-push hook passed bun turbo typecheck

Tested on:

  • macOS 26.4.1 (build 25E253)
  • Apple Silicon / arm64
  • bun 1.3.14
  • node v26.0.0
  • local OpenCode repro was on opencode 1.14.48 against Azure Foundry GPT-5 chat deployments

@itzAmrit
Copy link
Copy Markdown
Author

Closing this because the local setup was corrected to use the built-in azure provider with resourceName, rather than the custom @ai-sdk/openai-compatible Azure Foundry route. With the correct Azure config (and without forcing a full /openai/v1 base URL), both azure/gpt-5.4 and azure/gpt-5.3-codex work locally, so this patch is no longer the right fix.

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.

1 participant