pi-provider-kimi-code 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.ts CHANGED
@@ -41,7 +41,7 @@ import {
41
41
  saveProjectKimiCodeConfig,
42
42
  type KimiToolName,
43
43
  } from "./src/config.ts";
44
- import { KIMI_CODE_VERSION, PROVIDER_ID, getBaseUrl, getKimiApiType } from "./src/constants.ts";
44
+ import { PROVIDER_ID, PROVIDER_VERSION, getBaseUrl, getKimiApiType } from "./src/constants.ts";
45
45
  import { getCommonHeaders } from "./src/device.ts";
46
46
  import {
47
47
  type KimiOAuthCredentials,
@@ -463,7 +463,7 @@ function buildKimiMainTitle(config: KimiCodeConfig, cwd: string, extras: KimiOAu
463
463
  const sources = loadKimiCodeConfigSources({ cwd, home: os.homedir() });
464
464
  const modelName = extras.modelDisplay || "kimi-for-coding";
465
465
  return [
466
- `Kimi settings (provider v${KIMI_CODE_VERSION})`,
466
+ `Kimi settings (provider v${PROVIDER_VERSION})`,
467
467
  "",
468
468
  `Model: ${modelName}`,
469
469
  `Protocol: ${config.protocol} (${sources.protocol})`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-provider-kimi-code",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Use Kimi Code in Pi without losing the Kimi-specific bits",
5
5
  "keywords": [
6
6
  "ai-provider",
package/src/constants.ts CHANGED
@@ -41,8 +41,13 @@ export function getDefaultBaseUrl(protocol: KimiWireProtocol): string {
41
41
 
42
42
  export const DEFAULT_BASE_URL = getDefaultBaseUrl(ENV_KIMI_CODE_PROTOCOL);
43
43
 
44
- export const KIMI_CODE_VERSION = "0.6.0";
45
- export const KIMI_CODE_USER_AGENT = `kimi-code-cli/${KIMI_CODE_VERSION}`;
44
+ export const PROVIDER_VERSION = "0.6.2";
45
+
46
+ // Upstream kimi-code CLI version — used in User-Agent and X-Msh-Version
47
+ // headers to match the official client's identity. Update this when
48
+ // syncing with https://github.com/anthropics/kimi-code.
49
+ export const KIMI_UPSTREAM_VERSION = "0.18.0";
50
+ export const KIMI_CODE_USER_AGENT = `kimi-code-cli/${KIMI_UPSTREAM_VERSION}`;
46
51
  export const KIMI_PLATFORM = "kimi_code_cli";
47
52
 
48
53
  export function getKimiCodeHome(): string {
package/src/device.ts CHANGED
@@ -11,7 +11,7 @@ import { dirname } from "node:path";
11
11
  import {
12
12
  DEVICE_ID_PATH,
13
13
  KIMI_CODE_USER_AGENT,
14
- KIMI_CODE_VERSION,
14
+ KIMI_UPSTREAM_VERSION,
15
15
  KIMI_PLATFORM,
16
16
  } from "./constants.ts";
17
17
 
@@ -156,7 +156,7 @@ export function getCommonHeaders(): Record<string, string> {
156
156
  const headers = {
157
157
  "User-Agent": KIMI_CODE_USER_AGENT,
158
158
  "X-Msh-Platform": KIMI_PLATFORM,
159
- "X-Msh-Version": KIMI_CODE_VERSION,
159
+ "X-Msh-Version": KIMI_UPSTREAM_VERSION,
160
160
  "X-Msh-Device-Name": os.hostname(),
161
161
  "X-Msh-Device-Model": DEVICE_MODEL,
162
162
  "X-Msh-Os-Version": getOsVersion(),