Files
plugins/packages/kimi-work/tests/fixtures/work-config.web.json
T
yetone df552949e1 kimi-work 0.1.9: the menu is asked with the desktop's headers, so K3.1 Pro (k3d1-agent) is listed
泠夜Soul (Discord) has a Kimi Work membership whose desktop picks
K3.1 Pro, model id k3d1-agent, and magpie's Kimi Work list leaves it
out, on 0.1.7/0.1.8 too, which read DescribeKimiWorkConfig for this.

Cause, seen on the live endpoint (it answers without a sign-in):
DescribeKimiWorkConfig chooses the menu by the caller's x-msh-* headers.
Asked with none, as the plugin asked it (only User-Agent kimi-code-cli),
it answers with the web menu: k3-agent, k3-agent-swarm, k2d8-preview.
Asked as the desktop asks it (x-msh-platform mac or windows, as Kimi's
Connect interceptor sends from the desktop, with x-msh-version), it
answers k3d1-agent "K3.1 Pro", k2d8-preview, k3-agent. Five tries each,
stable. So the menu code was right and its reply was the web's.

What changed:
- www.kimi.com/apiv2 calls (the menu and GetSubscriptionStats, as the
  desktop's interceptor puts them on every apiv2 call) carry
  x-msh-platform (mac on macOS, windows on Windows, web elsewhere, as the
  desktop's own rule), x-msh-version 3.2.20 (the desktop build 0.1.8's
  headers came from) and R-Timezone. agent-gw's headers are unchanged.
- A menu row's reply limit is its requestParams.maxTokens (32768 for
  every model listed today, the value that was hard-coded).
- tests/fixtures/work-config.mac.json and work-config.web.json are the
  two literal replies, captured signed out on 10-24. The new tests have a
  fake that answers as the server does (desktop menu only for mac or
  windows) and check that k3d1-agent is listed as "K3.1 Pro" with
  low/high/max, 262144 context and 32768 output, on darwin and win32.

Run at this tree (origin/main 79e383c + this change), macOS, bun 1.4.2:
- bun test packages/kimi-work: 50 pass, 0 fail. With webHeaders(platform)
  put back to {'User-Agent':UA} by hand: 49 pass, 1 fail (the new menu
  test), so it fails without the fix.
- Live: createPlugin's own provider.models against the real
  DescribeKimiWorkConfig (Authorization taken out, no account here):
  darwin, win32 and linux list k3d1-agent, k2d8-preview, k3-agent. The
  same script on origin/main's index.mjs lists k3-agent, k3-agent-swarm,
  k2d8-preview on all three.
- HOME=$(mktemp -d) bun test: 2446 pass, 1 fail; the fail is layerfs's
  afterAll cleanup timing out at 5s at load ~500 (2 of 3 red alone,
  layerfs untouched), filed as #362.
- bun scripts/check.mjs: every plugin ok. git diff --check clean.

Not tried: a signed-in Work account (none on this machine), so neither
the signed-in menu nor a chat request with k3d1-agent through agent-gw
has been seen; the signed-out menu already lists k3d1-agent, so whether
a tier without it is refused is up to agent-gw. Not changed: the
User-Agent on www.kimi.com is still Kimi Code's, not the desktop
renderer's, which hasn't been captured (#363).
2026-10-24 19:14:00 +08:00

1 line
4.0 KiB
JSON

{"models":[{"key":"k3-agent","requestParams":{"modelId":"k3-agent","scenario":"SCENARIO_OK_COMPUTER","kimiPlusId":"ok-computer","agentMode":"TYPE_NORMAL","defaultReasoningEffort":"REASONING_EFFORT_HIGH","reasoningEffortOptions":[{"effort":"REASONING_EFFORT_LOW","displayName":"Standard"},{"effort":"REASONING_EFFORT_HIGH","displayName":"High"},{"effort":"REASONING_EFFORT_MAX","displayName":"Max","description":"Consumes more credits"}],"contextLength":1000000,"maxTokens":32768,"temperature":0.6,"topP":1,"contextLengthOptions":[{"contextLength":"CONTEXT_LENGTH_L","displayName":"Standard","available":true},{"contextLength":"CONTEXT_LENGTH_XL","displayName":"Extra Long","description":"Up to 1M tokens; consumes more credits","label":"Available for Allegro/Max members and above","minMembershipLevel":"LEVEL_ADVANCED"}],"defaultContextLength":"CONTEXT_LENGTH_L"},"display":{"displayName":"K3","description":"Chat & Agent, flagship all-rounder","inputPlaceholder":"Ask anything, or task an agent..."},"switchableTo":["k3-agent-ultra"],"daimonModelConfig":{"maxContextSize":1000000,"capabilities":["thinking","image_in","video_in","dynamically_loaded_tools"],"supportEfforts":["low","high","max"],"defaultEffort":"max"},"retryOptions":[{"retryCount":3,"minMembershipLevel":"LEVEL_BASIC"}],"legacyIds":["k3","k3-agent-ultra","k3-agent-swarm"]},{"key":"k3-agent-ultra","requestParams":{"modelId":"k3-agent-swarm","scenario":"SCENARIO_OK_COMPUTER","kimiPlusId":"ok-computer","agentMode":"TYPE_ULTRA","defaultReasoningEffort":"REASONING_EFFORT_HIGH","reasoningEffortOptions":[{"effort":"REASONING_EFFORT_LOW","displayName":"Standard"},{"effort":"REASONING_EFFORT_HIGH","displayName":"High"},{"effort":"REASONING_EFFORT_MAX","displayName":"Max","description":"Consumes more credits"}],"contextLength":1000000,"maxTokens":32768,"temperature":0.6,"topP":1,"contextLengthOptions":[{"contextLength":"CONTEXT_LENGTH_L","displayName":"Standard","available":true},{"contextLength":"CONTEXT_LENGTH_XL","displayName":"Extra Long","description":"Up to 1M tokens; consumes more credits","label":"Available for Allegro/Max members and above","minMembershipLevel":"LEVEL_ADVANCED"}],"defaultContextLength":"CONTEXT_LENGTH_L"},"display":{"displayName":"K3 Swarm","description":"Massive search, batch processing, and more in one go","inputPlaceholder":"Assign a task to your AI team..."},"switchableTo":["k3-agent"],"daimonModelConfig":{"maxContextSize":1000000,"capabilities":["thinking","image_in","video_in","dynamically_loaded_tools"],"supportEfforts":["low","high","max"],"defaultEffort":"max"},"retryOptions":[{"retryCount":3,"minMembershipLevel":"LEVEL_BASIC"}]},{"key":"k2d8-preview","requestParams":{"modelId":"k2d8-preview","scenario":"SCENARIO_OK_COMPUTER","kimiPlusId":"ok-computer","agentMode":"TYPE_NORMAL","defaultReasoningEffort":"REASONING_EFFORT_HIGH","reasoningEffortOptions":[{"effort":"REASONING_EFFORT_LOW","displayName":"Standard"},{"effort":"REASONING_EFFORT_HIGH","displayName":"High"},{"effort":"REASONING_EFFORT_MAX","displayName":"Max","description":"Consumes more credits"}],"contextLength":1000000,"maxTokens":32768,"temperature":0.6,"topP":1,"contextLengthOptions":[{"contextLength":"CONTEXT_LENGTH_L","displayName":"Standard","available":true},{"contextLength":"CONTEXT_LENGTH_XL","displayName":"Extra Long","description":"Up to 1M tokens; consumes more credits","label":"Available for Allegro/Max members and above","minMembershipLevel":"LEVEL_ADVANCED"}],"defaultContextLength":"CONTEXT_LENGTH_L"},"display":{"displayName":"K2.8 Preview","description":"Well-rounded and efficient for everyday tasks","inputPlaceholder":"Ask anything, or task an agent..."},"daimonModelConfig":{"maxContextSize":1000000,"capabilities":["thinking","image_in","video_in","dynamically_loaded_tools"],"supportEfforts":["low","high","max"],"defaultEffort":"max"},"retryOptions":[{"retryCount":3,"minMembershipLevel":"LEVEL_BASIC"}],"legacyIds":["k2d6-agent"],"swarm":{"enabled":true,"minMembershipLevel":"LEVEL_BASIC"}}],"defaultModelKey":"k2d8-preview","cacheTtlSeconds":"300"}