mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 14:00:24 +00:00
fix: keep openai-codex on HTTP responses transport
This commit is contained in:
@@ -11,15 +11,6 @@ describe("openai websocket transport selection", () => {
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it("accepts the Codex responses transport pair", () => {
|
||||
expect(
|
||||
shouldUseOpenAIWebSocketTransport({
|
||||
provider: "openai-codex",
|
||||
modelApi: "openai-codex-responses",
|
||||
}),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it("rejects mismatched OpenAI websocket transport pairs", () => {
|
||||
expect(
|
||||
shouldUseOpenAIWebSocketTransport({
|
||||
@@ -33,6 +24,12 @@ describe("openai websocket transport selection", () => {
|
||||
modelApi: "openai-responses",
|
||||
}),
|
||||
).toBe(false);
|
||||
expect(
|
||||
shouldUseOpenAIWebSocketTransport({
|
||||
provider: "openai-codex",
|
||||
modelApi: "openai-codex-responses",
|
||||
}),
|
||||
).toBe(false);
|
||||
expect(
|
||||
shouldUseOpenAIWebSocketTransport({
|
||||
provider: "anthropic",
|
||||
|
||||
@@ -35,10 +35,10 @@ export function shouldUseOpenAIWebSocketTransport(params: {
|
||||
provider: string;
|
||||
modelApi?: string | null;
|
||||
}): boolean {
|
||||
return (
|
||||
(params.modelApi === "openai-responses" && params.provider === "openai") ||
|
||||
(params.modelApi === "openai-codex-responses" && params.provider === "openai-codex")
|
||||
);
|
||||
// openai-codex normalizes to the ChatGPT backend HTTP path, not the public
|
||||
// OpenAI Responses websocket endpoint. Keep it on HTTP until a provider-
|
||||
// specific websocket target exists and is verified end-to-end.
|
||||
return params.modelApi === "openai-responses" && params.provider === "openai";
|
||||
}
|
||||
|
||||
export function shouldAppendAttemptCacheTtl(params: {
|
||||
|
||||
Reference in New Issue
Block a user