Skip to content

Commit a099acc

Browse files
clawsweeper[bot]leoge007LeoGe
authored
fix: update Azure OpenAI API version default to preview (#82072)
Summary: - The branch changes the Azure OpenAI Responses transport default API version from `2024-12-01-preview` to `preview`, updates the focused unit assertion, and adds a changelog entry. - Reproducibility: yes. The source PR provides live Azure curl/OpenClaw commands showing dated defaults fail w ... `api-version=preview` succeeds, and current main still resolves an unset env var to the old dated default. Automerge notes: - PR branch already contained follow-up commit before automerge: fix: update DEFAULT_AZURE_OPENAI_API_VERSION to 2025-04-01-preview (i… - PR branch already contained follow-up commit before automerge: fix: use preview literal for AZURE_OPENAI_API_VERSION - PR branch already contained follow-up commit before automerge: fix: repair Azure API version PR diff and tests - PR branch already contained follow-up commit before automerge: fix: keep Azure image API version default - PR branch already contained follow-up commit before automerge: fix: update Azure OpenAI API version default to preview Validation: - ClawSweeper review passed for head d7062f1. - Required merge gates passed before the squash merge. Prepared head SHA: d7062f1 Review: #82072 (comment) Co-authored-by: Leo Ge <116452300+leoge007@users.noreply.github.com> Co-authored-by: leoge007 <leoge@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
1 parent 06e79b2 commit a099acc

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Docs: https://docs.openclaw.ai
3434

3535
### Fixes
3636

37+
- Agents/Azure OpenAI Responses: default unset Azure OpenAI API versions to `preview` so `/openai/v1/responses` calls use Azure's current Responses API route. (#82026) Thanks @leoge007.
3738
- Agents: retry empty final turns for generic `anthropic-messages` providers instead of limiting non-visible recovery to Kimi, so custom/proxied Anthropic-compatible routes can recover with a visible answer. Addresses #46080. Thanks @wmgx, @w1tv, and @iFwu.
3839
- Control UI: rotate browser service-worker caches per build so updated Gateways are less likely to keep serving stale dashboard bundles that trigger protocol mismatch errors.
3940
- Discord: report unresolved configured bot-token SecretRefs during startup instead of treating the account as unconfigured. (#82009) Thanks @giodl73-repo.

src/agents/openai-transport-stream.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ describe("openai transport stream", () => {
604604
});
605605

606606
it("uses a valid Azure API version default when the environment is unset", () => {
607-
expect(resolveAzureOpenAIApiVersion({})).toBe("2024-12-01-preview");
607+
expect(resolveAzureOpenAIApiVersion({})).toBe("preview");
608608
expect(resolveAzureOpenAIApiVersion({ AZURE_OPENAI_API_VERSION: "2025-01-01-preview" })).toBe(
609609
"2025-01-01-preview",
610610
);

src/agents/openai-transport-stream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ import { stripSystemPromptCacheBoundary } from "./system-prompt-cache-boundary.j
6868
import { transformTransportMessages } from "./transport-message-transform.js";
6969
import { mergeTransportMetadata, sanitizeTransportPayloadText } from "./transport-stream-shared.js";
7070

71-
const DEFAULT_AZURE_OPENAI_API_VERSION = "2024-12-01-preview";
71+
const DEFAULT_AZURE_OPENAI_API_VERSION = "preview";
7272
const OPENAI_CODEX_RESPONSES_EMPTY_INPUT_TEXT = " ";
7373
const GEMINI_THOUGHT_SIGNATURE_VALIDATOR_SKIP = "skip_thought_signature_validator";
7474
const AZURE_RESPONSES_FIRST_EVENT_TIMEOUT_MS = 30_000;

0 commit comments

Comments
 (0)