Skip to content

Built-in Kimi provider template uses wrong API type, gets overwritten on upgrade/doctor #22409

@roooozzzz

Description

@roooozzzz

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

  1. Configure Kimi as a model provider (via openclaw configure or openclaw doctor --fix)
  2. Attempt to use kimi-coding/kimi-for-coding as the model
  3. 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

  1. Update the built-in Kimi provider template to use "api": "anthropic-messages" and "baseUrl": "https://api.kimi.com/coding/"
  2. Consider preserving user-customized provider settings during upgrades/doctor runs instead of overwriting them with defaults

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions