Plexum ProviderPlugin that serves Moonshot Kimi K2.6 ("Kimi for
Coding") via Kimi's Anthropic-compatible coding endpoint at
https://api.kimi.com/coding/v1/messages. Port of openclaw's
extensions/kimi-coding/provider-catalog.ts to Go + Plexum SDK.
Repo structure parallels Plexum-minimax-provider:
- internal/anthropic/ HTTP+SSE Anthropic Messages client, with new
UserAgent field (Kimi expects "claude-code/
0.1.0" — openclaw plugin parity)
- internal/translate/ canonical ↔ Anthropic translator (re-used
shape from MiniMax — no Kimi-specific quirks
needed for v1 plain-text path)
- cmd/plexum-kimi-provider-plugin/ ProviderPlugin entry
Declared models (Kimi server accepts all three; plugin normalizes
legacy aliases to the canonical id on the wire):
kimi-for-coding (current, default)
kimi-code (legacy alias)
k2p5 (legacy alias)
HostConfig: api_key (required), base_url (override), user_agent
(default "claude-code/0.1.0"), max_tokens_default (default 8192).
End-to-end verified against the live `sk-kimi-` subscription key:
1. CLI embedded turn 1: "Hi there! I'm Kimi."
2. CLI embedded turn 2: "I said hi, I'm Kimi." (multi-turn context OK)
3. Via gateway socket: {"outcome":"text","text":"...pong"}
4. Via Fabric channel: alice → bt2-clean → kimi agent → Kimi K2.6 →
outbound REST → reply in channel seq=15:
"Concise concurrency: goroutines and channels
make parallel code readable, safe, and
efficient without the usual threading
complexity."
Test the bidirectional channel pipeline works with a fresh provider:
Fabric (channel plugin) + Kimi (provider plugin) wired through Plexum
agentloop, MiniMax-style plugin packaging.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
9.2 KiB
9.2 KiB