diff --git a/packages/opencode/src/plugin/openai/codex.ts b/packages/opencode/src/plugin/openai/codex.ts index b6edf173c8b0..7ed48d087959 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)) }, }