fix(command-code): align CLI version header (#3462)

Integrated into release/v3.8.17
This commit is contained in:
Hevener Ancelmo Pereira
2026-06-09 02:35:08 +00:00
committed by GitHub
parent 49c11f0cea
commit 1cc2313a4f
5 changed files with 49 additions and 68 deletions

View File

@@ -8,7 +8,8 @@ const TEST_DATA_DIR = fs.mkdtempSync(path.join(os.tmpdir(), "omniroute-command-c
process.env.DATA_DIR = TEST_DATA_DIR;
const { REGISTRY, getRegistryEntry } = await import("../../open-sse/config/providerRegistry.ts");
const { CommandCodeExecutor } = await import("../../open-sse/executors/commandCode.ts");
const { CommandCodeExecutor, COMMAND_CODE_VERSION } =
await import("../../open-sse/executors/commandCode.ts");
const { getExecutor, hasSpecializedExecutor } = await import("../../open-sse/executors/index.ts");
const core = await import("../../src/lib/db/core.ts");
@@ -117,7 +118,7 @@ test("Command Code executor posts wrapped body and required headers to /alpha/ge
assert.equal(calls[0].url, "https://api.commandcode.ai/alpha/generate");
assert.equal(calls[0].init.method, "POST");
assert.equal(headers.Authorization, "Bearer cc_test_key");
assert.equal(headers["x-command-code-version"], "0.24.1");
assert.equal(headers["x-command-code-version"], COMMAND_CODE_VERSION);
assert.equal(headers["x-cli-environment"], "external");
assert.equal(headers["x-project-slug"], "pi-cc");
assert.equal(headers["x-taste-learning"], "false");