Bypass proxy compaction for native Codex context

This commit is contained in:
Jan Leon
2026-07-30 03:44:41 +02:00
parent ed2db6cb19
commit b02c586cb4
8 changed files with 107 additions and 16 deletions

View File

@@ -33,7 +33,11 @@ import {
HTTP_STATUS,
ANTIGRAVITY_PRE_RESPONSE_TIMEOUT_CODE,
} from "@omniroute/open-sse/config/constants.ts";
import { getTargetFormat, detectFormatFromUrl } from "@omniroute/open-sse/services/provider.ts";
import {
getTargetFormat,
detectFormatFromEndpoint,
detectFormatFromUrl,
} from "@omniroute/open-sse/services/provider.ts";
import {
getModelsByProviderId,
getModelTargetFormat,
@@ -778,6 +782,9 @@ export async function handleChat(
const response = await (handleComboChat as any)({
body,
combo,
clientManagedResponsesContext:
sourceFormat === "openai-responses" &&
new URL(request.url).pathname.split("/").includes("responses"),
handleSingleModel: (
b: any,
m: string,
@@ -1045,6 +1052,11 @@ async function handleSingleModelChat(
return handleComboChat({
body,
combo: redirectCombo,
clientManagedResponsesContext:
detectFormatFromEndpoint(body, clientRawRequest?.endpoint || "") === "openai-responses" &&
String(clientRawRequest?.endpoint || "")
.split("/")
.includes("responses"),
handleSingleModel: (
b: any,
m: string,