Skip to content

Commit ba811b4

Browse files
author
OpenClaw
committed
fix(onboard): restore openai-responses API for all Azure URLs
Regression introduced in 91104ac broke local vLLM endpoints that rely on openai-responses API compatibility. The commit narrowed Azure detection from 'isAzure' to 'isAzureOpenAi' (*.openai.azure.com only), causing non-Azure OpenAI-compatible endpoints to route to /v1/chat/completions instead of /responses. This resulted in 404 errors for local vLLM setups configured with openai-responses mode. Fix: Revert providerApi logic to use 'isAzure' (covers both *.services.ai.azure.com and *.openai.azure.com) to preserve backward compatibility. Fixes #50719
1 parent 55e12bd commit ba811b4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/commands/onboard-custom.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ describe("applyCustomApiConfig", () => {
506506
const provider = result.config.models?.providers?.[providerId];
507507

508508
expect(provider?.baseUrl).toBe("https://my-resource.services.ai.azure.com/openai/v1");
509-
expect(provider?.api).toBe("openai-completions");
509+
expect(provider?.api).toBe("openai-responses");
510510
expect(provider?.authHeader).toBe(false);
511511
expect(provider?.headers).toEqual({ "api-key": "key123" });
512512

src/commands/onboard-custom.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ export function applyCustomApiConfig(params: ApplyCustomApiConfigParams): Custom
686686
normalizeOptionalProviderApiKey(params.apiKey) ??
687687
normalizeOptionalProviderApiKey(existingApiKey);
688688

689-
const providerApi = isAzureOpenAi
689+
const providerApi = isAzure
690690
? ("openai-responses" as const)
691691
: resolveProviderApi(params.compatibility);
692692
const azureHeaders = isAzure && normalizedApiKey ? { "api-key": normalizedApiKey } : undefined;

0 commit comments

Comments
 (0)