mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 12:22:14 +03:00
* fix(codex): strip include from compact responses requests Reconstructed onto release/v3.8.47 to drop unrelated main-drift (deps/electron/proxy files belong to #6620, not this PR); keeps only the author's changes. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> * fix(6805): move include-strip assertion to standalone test file to keep executor-codex.test.ts under frozen size cap Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
29 lines
1.0 KiB
TypeScript
29 lines
1.0 KiB
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
import { CodexExecutor } from "../../open-sse/executors/codex.ts";
|
|
|
|
// #6805: compact Codex requests must not forward `include` (e.g.
|
|
// "reasoning.encrypted_content") — the compact endpoint rejects it. Kept in a
|
|
// standalone file so the frozen executor-codex.test.ts does not grow past its cap.
|
|
test("CodexExecutor.transformRequest strips include from compact requests (#6805)", () => {
|
|
const executor = new CodexExecutor();
|
|
const result = executor.transformRequest(
|
|
"gpt-5.3-codex",
|
|
{
|
|
_nativeCodexPassthrough: true,
|
|
include: ["reasoning.encrypted_content"],
|
|
instructions: "keep this",
|
|
stream: false,
|
|
},
|
|
false,
|
|
{
|
|
requestEndpointPath: "/responses/compact",
|
|
providerSpecificData: { requestDefaults: { serviceTier: "priority" } },
|
|
}
|
|
);
|
|
assert.equal(result.include, undefined);
|
|
assert.equal(result._nativeCodexPassthrough, undefined);
|
|
assert.equal(result.instructions, "keep this");
|
|
});
|