-
-
Notifications
You must be signed in to change notification settings - Fork 69.3k
Built-in Kimi provider template uses wrong API type, gets overwritten on upgrade/doctor #22409
Description
Summary
The built-in Kimi provider template in openclaw.json uses "api": "openai-completions" with "baseUrl": "https://api.kimi.com/coding/v1", which is the Roo Code (OpenAI compatible) integration format. However, OpenClaw is a Claude Code-style agent and should use the Anthropic Messages API format instead.
According to Kimi's official documentation, Claude Code-type agents should use:
"api": "anthropic-messages""baseUrl": "https://api.kimi.com/coding/"
Using the current default template results in a 403 error: "Kimi For Coding is currently only available for Coding Agents".
Steps to Reproduce
- Configure Kimi as a model provider (via
openclaw configureoropenclaw doctor --fix) - Attempt to use
kimi-coding/kimi-for-codingas the model - Observe 403 error from Kimi API
Expected Behavior
The built-in Kimi provider template should default to:
{
"kimi-coding": {
"baseUrl": "https://api.kimi.com/coding/",
"api": "anthropic-messages",
"models": [
{
"id": "kimi-for-coding",
"name": "Kimi for Coding",
"contextWindow": 262144,
"maxTokens": 32768
}
]
}
}Actual Behavior
The template uses:
{
"kimi-coding": {
"baseUrl": "https://api.kimi.com/coding/v1",
"api": "openai-completions",
...
}
}Additional Issue: Config Overwrite on Upgrade
Even after manually fixing the api field to "anthropic-messages", running openclaw doctor --fix or upgrading OpenClaw resets the Kimi provider config back to the incorrect "openai-completions" template. This causes the integration to break repeatedly after each update.
All backup files (openclaw.json.bak, .bak.1, .bak.2, etc.) show the same incorrect default values, confirming that every config regeneration uses the wrong template.
Environment
- OpenClaw version: 2026.2.19-2
- Platform: macOS (Darwin 25.3.0)
Suggested Fix
- Update the built-in Kimi provider template to use
"api": "anthropic-messages"and"baseUrl": "https://api.kimi.com/coding/" - Consider preserving user-customized provider settings during upgrades/doctor runs instead of overwriting them with defaults