hzhang 0a889250a6 refactor: import shared Plexum-anthropic-compat-client lib
Same refactor as Plexum-minimax-provider — drop the duplicated
internal/{anthropic,translate}, import from the shared
Plexum-anthropic-compat-client repo. UserAgent + ExtraHeaders fields
the Kimi plugin needs already live on Client there.

No behavioral change. Live re-verified after refactor: plexum say →
"ready" (via Kimi K2.6).
2026-05-31 20:35:11 +01:00

Plexum-kimi-provider

Plexum ProviderPlugin that serves Moonshot Kimi K2.6 ("Kimi for Coding") via Kimi's Anthropic-compatible coding endpoint (https://api.kimi.com/coding/v1/messages).

Port of openclaw/extensions/kimi-coding/provider-catalog.ts to Go + Plexum SDK.

Status

v0.1 — current: API key auth (Kimi subscription sk-kimi-...), streaming SSE, models kimi-for-coding / kimi-code / k2p5. Sends User-Agent: claude-code/0.1.0 (mirrors openclaw plugin) for parity with Kimi's coding subscription auth path.

Install

cd ~/Plexum-kimi-provider
./scripts/install.sh

Then:

  1. Write API key to ~/.plexum/plugins/plexum-kimi-provider/config.json:

    {"api_key": "sk-kimi-..."}
    

    (chmod 600 it.)

  2. Allow the plugin in ~/.plexum/plexum.json:

    {"plugins": {"allow": ["plexum-kimi-provider"]}}
    
  3. Point an agent at Kimi:

    plexum agent-add --model kimi-for-coding my-agent
    
  4. Restart and talk:

    systemctl --user restart plexum
    plexum say --agent-id my-agent --session-id $(plexum new-session --agent-id my-agent) "hello"
    

Config options

Field Default Notes
api_key (required) sk-kimi-... subscription key
base_url https://api.kimi.com/coding override only if you proxy
user_agent claude-code/0.1.0 matches openclaw plugin
max_tokens_default 8192 used when TurnRequest.MaxTokens unset

Model id aliases

Kimi server accepts all three; the plugin normalizes to kimi-for-coding on the wire for consistent logs:

advertised id wire id
kimi-for-coding kimi-for-coding
kimi-code (legacy) kimi-for-coding
k2p5 (legacy) kimi-for-coding

Architecture

Same shape as Plexum-minimax-provider:

  • internal/anthropic/ — HTTP+SSE Messages client (now with UserAgent field; can be shared by future Anthropic-compat providers)
  • internal/translate/ — canonical ↔ Anthropic translator
  • cmd/plexum-kimi-provider-plugin/ — ProviderPlugin entry

License

Same as Plexum.

Description
Plexum ProviderPlugin for Moonshot Kimi K2.6 (anthropic-compat coding endpoint)
Readme 5 MiB
Languages
Go 68.7%
Shell 31.3%