Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/fixes/kimi-cli-2-1-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- **fix(providers):** advertise the Kimi Code CLI version 2.1.1. The pinned constant was still 0.26.0, so the `X-Msh-Version` and `User-Agent` headers OmniRoute sends to api.kimi.com trailed the real CLI by two major versions. `KIMI_CLI_VERSION` still overrides the pin per deployment.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const KIMI_CODING_OPENAI_URL = `${KIMI_CODING_BASE_URL}/chat/completions`
export const KIMI_CODING_ANTHROPIC_URL = `${KIMI_CODING_BASE_URL}/messages?beta=true`;

export const KIMI_CODE_CLI_PLATFORM = "kimi_code_cli";
export const KIMI_CODE_CLI_VERSION = "0.26.0";
export const KIMI_CODE_CLI_VERSION = "2.1.1";

export type KimiCodeThinkingPolicy = {
supportsThinking: boolean;
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/executor-kimi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ describe("KimiExecutor", () => {
assert.equal(headers.Authorization, "Bearer oauth-token");
assert.equal(headers["x-api-key"], undefined);
assert.equal(headers["X-Msh-Platform"], "kimi_code_cli");
assert.equal(headers["X-Msh-Version"], "0.26.0");
assert.equal(headers["X-Msh-Version"], "2.1.1");
assert.equal(headers["X-Msh-Device-Id"], "12345678-1234-1234-1234-1234567890ab");
assert.equal(headers["User-Agent"], "kimi-code-cli/0.26.0");
assert.equal(headers["User-Agent"], "kimi-code-cli/2.1.1");
});

it("routes Anthropic-protocol models to beta Messages with x-api-key", () => {
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/kimi-coding-apikey-quota-4435.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ test("kimi-coding (OAuth) keeps Bearer + device headers (not x-api-key)", async
assert.ok(call, "kimi /usages endpoint should be called for kimi-coding");
assert.equal(call.headers["Authorization"], "Bearer tok-abc");
assert.equal(call.headers["X-Msh-Platform"], "kimi_code_cli");
assert.equal(call.headers["X-Msh-Version"], "0.26.0");
assert.equal(call.headers["X-Msh-Version"], "2.1.1");
assert.equal(call.headers["X-Msh-Device-Id"], "12345678-1234-1234-1234-1234567890ab");
assert.equal(call.headers["User-Agent"], "kimi-code-cli/0.26.0");
assert.equal(call.headers["User-Agent"], "kimi-code-cli/2.1.1");
assert.equal(call.headers["x-api-key"], undefined);
});

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/kimi-coding-model-discovery.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ test("Kimi Code discovery uses OAuth CLI identity while the hidden legacy path k
assert.equal(oauthHeaders?.Authorization, "Bearer oauth-token");
assert.equal(oauthHeaders?.Accept, "application/json");
assert.equal(oauthHeaders?.["X-Msh-Platform"], "kimi_code_cli");
assert.equal(oauthHeaders?.["X-Msh-Version"], "0.26.0");
assert.equal(oauthHeaders?.["X-Msh-Version"], "2.1.1");
assert.equal(oauthHeaders?.["X-Msh-Device-Id"], "12345678-1234-1234-1234-1234567890ab");
assert.equal(oauthHeaders?.["User-Agent"], "kimi-code-cli/0.26.0");
assert.equal(oauthHeaders?.["User-Agent"], "kimi-code-cli/2.1.1");

const primaryApiKeyHeaders = PROVIDER_MODELS_CONFIG["kimi-coding"].buildHeaders?.("api-key", {
authType: "apikey",
Expand Down
Loading