Files
OmniRoute/tests/unit/cli-fingerprints.test.ts
Diego Rodrigues de Sa e Souza ee24eb52d4 Release v3.8.33 (#4515)
Release v3.8.33 — full CHANGELOG in the PR body. Blocking gates green (Build, Lint, Unit Tests 8/8, Package Artifact, Quality Gates, Quality Ratchet, Docs Sync, PR Test Policy, test-vitest). Admin-merged over a Node 26 future-compat timer flake (1/4) + an E2E UI flake (3/9) — both verified non-deterministic; full test:unit validated locally (16936 pass).
2026-06-22 03:17:02 -03:00

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",
]);
});