泠夜Soul (Discord #help, 10-24) is on Kimi's 99 membership and the official Kimi Work desktop has "Kimi K3.1 Pro" picked in its composer, but magpie's Kimi Work list (0.1.6) leaves it out. Cause, read from Kimi desktop 3.2.20's main bundle (decoded): the desktop does not build its Work model menu from agent-gw's /models. It calls the Connect RPC kimi.gateway.config.v1.ConfigService/DescribeKimiWorkConfig on https://www.kimi.com/apiv2 with the web sign-in, takes models plus moreModels, and hands each entry's requestParams.modelId to its agent (conversations.updateKimiModelList), which sends it to agent-gw as the model. The plugin listed /models only, so a tier model the menu has and /models doesn't was never offered. That /models leaves K3.1 Pro out is inferred from the report (0.1.6 already lists /models in full), not seen on an account. What changed: - provider.models asks both lists at once. Menu entries come first, under display.displayName, with id requestParams.modelId; reasoning levels are requestParams.reasoningEffortOptions, else daimonModelConfig's supportEfforts ("off" is REASONING_EFFORT_NONE there, sent as none); image input from its "image_in" capability. Context is capped at the standard 262,144 as before: XL is an X-Kimi-Context-Length header the desktop sends only when the user picks extended, and this doesn't send it. - An id both list keeps /models' row under the menu's name. Either list failing leaves the other; both failing, or the menu empty with /models failing, throws, so magpie keeps the last good list. - The reply is read in camelCase and in the proto's snake_case names. The fixture (tests/fixtures/work-config.shape.json) is the reply's shape from the proto descriptor and the desktop's mapping code. No reply was captured from an account; k3d1-pro in it is a placeholder id, and the fixture says so. Run: bun test packages/kimi-work (46 pass, 0 fail); with the menu call turned off by hand in index.mjs the two new list tests go red (44 pass, 2 fail); bun scripts/check.mjs kimi-work ok; git diff --check clean. Not tried: a real Work account (none on this machine or the Windows box), so neither the menu's reply nor a chat request with K3.1 Pro's id through agent-gw has been seen. The model-speed header (X-Kimi-Model-Speed) is not sent either.
41 lines
2.8 KiB
JSON
41 lines
2.8 KiB
JSON
{
|
|
"_source": "Shape of kimi.gateway.config.v1.ConfigService/DescribeKimiWorkConfig's reply, from the proto descriptor and the mapping in Kimi desktop 3.2.20's main bundle (field names, nesting, enums as the desktop reads them). No reply was captured from an account: k3-agent and k2d8-preview are ids Work's /models lists; k3d1-pro is a placeholder for the tier model a 99-plan account's menu shows as Kimi K3.1 Pro.",
|
|
"models": [
|
|
{
|
|
"key": "k3-agent",
|
|
"requestParams": {"modelId": "k3-agent", "scenario": "SCENARIO_K2D5", "agentMode": "TYPE_UNSPECIFIED",
|
|
"defaultReasoningEffort": "REASONING_EFFORT_HIGH",
|
|
"reasoningEffortOptions": [
|
|
{"effort": "REASONING_EFFORT_LOW", "reasoningEffort": "low", "displayName": "Standard", "description": ""},
|
|
{"effort": "REASONING_EFFORT_HIGH", "reasoningEffort": "high", "displayName": "High", "description": ""},
|
|
{"effort": "REASONING_EFFORT_MAX", "reasoningEffort": "max", "displayName": "Max", "description": ""}],
|
|
"contextLengthOptions": [], "defaultContextLength": "CONTEXT_LENGTH_UNSPECIFIED"},
|
|
"display": {"displayName": "K3", "description": "", "inputPlaceholder": "", "label": []},
|
|
"switchableTo": [], "capabilities": [],
|
|
"daimonModelConfig": {"maxContextSize": 262144, "capabilities": ["thinking", "image_in"], "supportEfforts": ["low", "high", "max"], "defaultEffort": "high", "protocol": "", "betaApi": false, "reasoningKey": ""},
|
|
"legacyIds": [], "moonPhase": "MOON_PHASE_UNSPECIFIED", "speedOptions": [], "defaultSpeedValue": ""
|
|
},
|
|
{
|
|
"key": "k3d1-pro",
|
|
"requestParams": {"modelId": "k3d1-pro", "reasoningEffortOptions": [],
|
|
"contextLengthOptions": [{"contextLength": "CONTEXT_LENGTH_L"}, {"contextLength": "CONTEXT_LENGTH_XL"}], "defaultContextLength": "CONTEXT_LENGTH_L"},
|
|
"display": {"displayName": "Kimi K3.1 Pro", "description": "", "inputPlaceholder": "", "label": ["99"]},
|
|
"switchableTo": [], "capabilities": [],
|
|
"daimonModelConfig": {"maxContextSize": 1000000, "capabilities": ["thinking", "image_in"], "supportEfforts": ["off", "high", "max"], "defaultEffort": "high", "protocol": "", "betaApi": false, "reasoningKey": ""},
|
|
"legacyIds": [], "speedOptions": [{"speedValue": "fast", "displayName": "Fast", "available": true}], "defaultSpeedValue": "fast"
|
|
}
|
|
],
|
|
"defaultModelKey": "k3-agent",
|
|
"cacheTtlSeconds": "3600",
|
|
"moreModels": [
|
|
{
|
|
"key": "k2d8-preview",
|
|
"requestParams": {"modelId": "k2d8-preview"},
|
|
"display": {"displayName": "K2.8 Preview", "label": []},
|
|
"daimonModelConfig": {"maxContextSize": 262144, "capabilities": [], "supportEfforts": [], "defaultEffort": ""},
|
|
"switchableTo": [], "legacyIds": [], "speedOptions": [], "defaultSpeedValue": ""
|
|
}
|
|
],
|
|
"debugPanelEnabled": false
|
|
}
|