fix: update Azure OpenAI API version default to preview#82026
Conversation
…r Responses API support
…mage gen provider)
|
Codex review: passed. Summary Reproducibility: yes. with a real Azure OpenAI Responses resource; current main clearly passes the obsolete default into the SDK, and the PR body supplies redacted negative-control and after-fix output for that path. Real behavior proof Next step before merge Security Review detailsBest possible solution: Land this narrow Responses transport default/test update as the canonical fix for the paired Azure Responses bug, leaving image-generation and docs default changes to a separately proven follow-up if needed. Do we have a high-confidence way to reproduce the issue? Yes, with a real Azure OpenAI Responses resource; current main clearly passes the obsolete default into the SDK, and the PR body supplies redacted negative-control and after-fix output for that path. Is this the best way to solve the issue? Yes; changing only the Responses transport default to What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against be166b9ae48d. |
|
Updated the PR after the review. What changed:
Final PR diff is now the narrow 5-file change:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Updated the PR body to use the required |
|
@clawsweeper automerge |
|
🦞🔧 Source: I will update this PR branch, or open a safe credited replacement, if the repair worker finds a narrow CI fix. Automerge progress:
|
|
ClawSweeper 🐠 reef update Thanks for the work on this. ClawSweeper opened a replacement PR only because the source branch was not writable from the available bot permissions. branch tides, not contributor blame. Why replacement: ClawSweeper could not update the source PR branch directly; GitHub did not grant sufficient push rights to the bot for that branch.
fish notes: model gpt-5.5, reasoning high; reviewed against d7062f1. |
Summary
Fix
azure-openai-responsesprovider returning "400 API version not supported" by updating the default Azure API version from2024-12-01-previewtopreview.Problem
The current default
api-version=2024-12-01-previewdoes not work for our Azure OpenAI Responses endpoint. Calls toazure-openai-responses/gpt-5.5can fail with400 API version not supportedwhenAZURE_OPENAI_API_VERSIONis unset and the transport falls back to the built-in default.Root Cause
resolveAzureOpenAIApiVersion()insrc/agents/openai-transport-stream.tsdefaults to"2024-12-01-preview"whenAZURE_OPENAI_API_VERSIONis unset. The Azure/openai/v1/responsesendpoint in our live resource acceptsapi-version=preview; dated preview values tested against the same endpoint returned400 API version not supported.Changes
src/agents/openai-transport-stream.ts- changeDEFAULT_AZURE_OPENAI_API_VERSIONto"preview".extensions/openai/image-generation-provider.ts- change the matching Azure image-generation default to"preview".src/agents/openai-transport-stream.test.ts- update the Azure default assertion.extensions/openai/image-generation-provider.test.ts- update Azure image URL assertions.docs/providers/openai.md- document the new default.Real behavior proof
azure-openai-responses/gpt-5.5fail with400 API version not supportedwhen OpenClaw falls back to the old defaultapi-version=2024-12-01-preview.https://<resource>.openai.azure.com/openai/v1and deployment/modelgpt-5.5. Resource hostname, key, and account details are redacted.api-version=preview; the OpenClaw model-run path and full agent path both returnOKthroughazure-openai-responses/gpt-5.5without fallback.Related
Fixes issue where fallback chains including
azure-openai-responses/gpt-5.5can fail because the default Azure API version is rejected before a successful model response is produced.