소스 검색

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

DS 6 달 전
부모
커밋
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,
               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))
           },
         }