fix(openai): support websocket custom base URLs (#29636)

This commit is contained in:
DS 2026-05-27 19:46:30 -04:00 committed by GitHub
parent 49e8d324dd
commit ec26d78450
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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))
},
}