mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-06 15:22:12 +03:00
Thanks @KooshaPari! Rebased onto release/v3.8.32 (clean cherry-pick — coexists with #4467's specialty changes, 118/118 unit + 12/12 memory-pipeline integration). Codex fingerprint ordering + memory-search contract fixes land.
(cherry picked from commit 21d61c69d7)
37 lines
932 B
TypeScript
37 lines
932 B
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
const { applyFingerprint } = await import("../../open-sse/config/cliFingerprints.ts");
|
|
|
|
test("Codex CLI fingerprint orders prompt_cache_key before include", () => {
|
|
const body = {
|
|
model: "gpt-5.5-low",
|
|
stream: true,
|
|
input: [{ role: "user", content: "hello" }],
|
|
instructions: "You are Codex.",
|
|
store: false,
|
|
reasoning: { effort: "low" },
|
|
tools: [],
|
|
tool_choice: "auto",
|
|
include: ["reasoning.encrypted_content"],
|
|
prompt_cache_key: "conv-codex",
|
|
service_tier: "priority",
|
|
};
|
|
|
|
const result = applyFingerprint("codex", {}, body);
|
|
const orderedKeys = Object.keys(JSON.parse(result.bodyString));
|
|
|
|
assert.deepEqual(orderedKeys.slice(0, 10), [
|
|
"model",
|
|
"stream",
|
|
"input",
|
|
"instructions",
|
|
"store",
|
|
"reasoning",
|
|
"prompt_cache_key",
|
|
"tools",
|
|
"tool_choice",
|
|
"include",
|
|
]);
|
|
});
|