From ec26d7845005d5db3166b9d181f802b04e99d864 Mon Sep 17 00:00:00 2001 From: DS <78942835+Tarquinen@users.noreply.github.com> Date: Wed, 27 May 2026 19:46:30 -0400 Subject: [PATCH] fix(openai): support websocket custom base URLs (#29636) --- packages/opencode/src/plugin/openai/codex.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opencode/src/plugin/openai/codex.ts b/packages/opencode/src/plugin/openai/codex.ts index b6edf173c8..7ed48d0879 100644 --- a/packages/opencode/src/plugin/openai/codex.ts +++ b/packages/opencode/src/plugin/openai/codex.ts @@ -506,7 +506,7 @@ export async function CodexAuthPlugin(input: PluginInput, options: CodexAuthPlug ...init, headers, } - if (websocketFetch && parsed.pathname.includes("/v1/responses")) return websocketFetch(url, requestInit) + if (websocketFetch && parsed.pathname.endsWith("/responses")) return websocketFetch(url, requestInit) return fetch(url, OpenAIWebSocketPool.withoutInternalHeaders(requestInit)) }, }