Skip to content

Add verified Kimi Code subscription provider preset - #87

Merged
melvincarvalho merged 2 commits into
gh-pagesfrom
issue-86-kimi-coding-preset
Jun 12, 2026
Merged

melvincarvalho merged 2 commits into
gh-pagesfrom
issue-86-kimi-coding-preset

Conversation

@melvincarvalho

Copy link
Copy Markdown
Contributor

Closes #86. First concrete deliverable of #85.

What

Adds a kimi coding-plan preset and disambiguates the existing moonshot one.

preset surface key when
kimi (new) https://api.kimi.com/coding KIMI_API_KEY (authToken) Kimi Code subscription
moonshot (clarified) https://api.moonshot.ai/anthropic MOONSHOT_API_KEY pay-as-you-go (metered)

Model: kimi-for-coding.

Why

The metered moonshot endpoint 429s "account suspended due to insufficient balance" on a coding subscription — wrong surface. The subscription has its own Anthropic-native endpoint and its own sk-kimi-… keys.

Verified

Smoke-tested end-to-end by driving agent-micro's runner.js against a real agent workspace with providerEnv = {ANTHROPIC_BASE_URL: https://api.kimi.com/coding, ANTHROPIC_AUTH_TOKEN: sk-kimi-…} + model: kimi-for-coding → status: success, real reply, usage: 1730 in / 27 out.

Probes that pinned it down:

  • POST .../coding/v1/messages (Anthropic) → 200
  • OpenAI /chat/completions → 403 "only available for Coding Agents such as Kimi CLI, Claude Code, Roo Code, Kilo Code" — jsclaw's harness (Claude Code) is explicitly allowed.

Scope

Preset + note + tests only. The wizard already enumerates PROVIDERS, so kimi appears as a menu choice automatically. Runtime/per-agent switching and key rotation remain in #85.

Tests

test/providers.test.js extended (kimi preset well-formed; onboarding builds the right ${KIMI_API_KEY} config). Full suite green (166/166), lint clean.

Adds a 'kimi' coding-plan preset pointing at the Anthropic-native
https://api.kimi.com/coding surface (KIMI_API_KEY as ANTHROPIC_AUTH_TOKEN,
model kimi-for-coding), smoke-tested end-to-end against agent-micro.

Clarifies the existing 'moonshot' preset as pay-as-you-go (metered) so the
subscription and metered Kimi surfaces aren't confused — the metered one
429s 'account suspended' on a coding subscription.

Refs #85.
Adds the verified 'kimi' coding-plan preset (api.kimi.com/coding,
kimi-for-coding) so a Kimi Code subscription is selectable alongside GLM,
and disambiguates the metered 'moonshot' preset. Refs #85, closes #86.
@melvincarvalho

Copy link
Copy Markdown
Contributor Author

Bumped v0.0.19 → v0.0.20 on the branch — "agents run on the Kimi Code subscription" — following the per-feature release: convention.

PR is complete as a self-contained deliverable: preset + disambiguation + tests + version bump. Nothing else needed here.

Deferred to #85 (intentionally out of scope): runtime/per-agent provider switching, key rotation/failover, OAuth-only variants (minimax-portal, qwen-oauth).

@melvincarvalho
melvincarvalho merged commit afb2092 into gh-pages Jun 12, 2026
1 check passed
@melvincarvalho
melvincarvalho deleted the issue-86-kimi-coding-preset branch June 12, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add verified Kimi coding-plan provider preset (api.kimi.com/coding)

1 participant