Преглед на файлове

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

DS преди 3 месеца
родител
ревизия
ec26d78450
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      packages/opencode/src/plugin/openai/codex.ts

+ 1 - 1
packages/opencode/src/plugin/openai/codex.ts

@@ -506,7 +506,7 @@ export async function CodexAuthPlugin(input: PluginInput, options: CodexAuthPlug
               ...init,
               ...init,
               headers,
               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))
             return fetch(url, OpenAIWebSocketPool.withoutInternalHeaders(requestInit))
           },
           },
         }
         }