Skip to content

Add Kimi for Code provider support#480

Open
skeltavik wants to merge 2 commits intoRightNow-AI:mainfrom
skeltavik:feat/add-kimi-for-code-provider
Open

Add Kimi for Code provider support#480
skeltavik wants to merge 2 commits intoRightNow-AI:mainfrom
skeltavik:feat/add-kimi-for-code-provider

Conversation

@skeltavik
Copy link

Summary

Adds support for the Kimi for Code API endpoint (https://api.kimi.com/coding/v1), an Anthropic-compatible coding agent API with 262K context window.

Changes

  • Add KIMI_CODING_BASE_URL constant in openfang-types
  • Add kimi_coding provider using Anthropic driver (Anthropic-compatible endpoint)
  • Add kimi-for-coding model entry (262K context, 32K output, subscription-based)
  • Update provider count tests (36 → 37, 31 → 32)
  • Add test for kimi_coding provider defaults

Testing

  • cargo clippy --workspace --all-targets -- -D warnings passes (for modified crates)
  • cargo test --workspace passes (687 tests)
  • Live integration tested - requires Kimi Code subscription

Security

  • No new unsafe code
  • No secrets or API keys in diff
  • User input validated at boundaries

API Key

Environment variable: KIMI_API_KEY

Usage

[default_model]
provider = "kimi_coding"
model = "kimi-for-coding"

Note

Kimi for Code uses a subscription-based "Coding Plan" (not per-token pricing) and is only available for authorized coding agents like Claude Code, Roo Code, etc.

Adds support for the Kimi for Code API endpoint (https://api.kimi.com/coding/v1),
an Anthropic-compatible coding agent API with 262K context window.

Changes:
- Add KIMI_CODING_BASE_URL constant in openfang-types
- Add kimi_coding provider with Anthropic driver compatibility
- Add kimi-for-coding model entry (262K context, 32K output)
- Update tests and provider counts

API Key: KIMI_API_KEY
Usage: provider = "kimi_coding", model = "kimi-for-coding"
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.

1 participant