Support Kimi Code API for Claude Code routing (#951)

* Support Kimi Code API and Claude Code protocol compatibility

Co-authored-by: Musa <musa@spherrrical.dev>

* Fix black formatting in config_generator

Co-authored-by: Musa <musa@spherrrical.dev>

* Warn when stripping unsupported Kimi Code request fields

Co-authored-by: Musa <musa@spherrrical.dev>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This commit is contained in:
Musa 2026-06-03 10:09:50 -07:00 committed by GitHub
parent 554a3d1f6a
commit f3d6ea41ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 183 additions and 2 deletions

View file

@ -432,6 +432,9 @@ Moonshot AI
* - Model Name
- Model ID for Config
- Description
* - Kimi for Coding
- ``moonshotai/kimi-for-coding``
- Kimi Code API model for agentic coding (use with ``base_url: https://api.kimi.com/coding/v1``)
* - Kimi K2 Preview
- ``moonshotai/kimi-k2-0905-preview``
- Foundation model optimized for agentic tasks with 32B activated parameters
@ -447,6 +450,13 @@ Moonshot AI
.. code-block:: yaml
llm_providers:
# Kimi Code API (Claude Code / agentic clients via Plano translation)
- model: moonshotai/kimi-for-coding
access_key: $MOONSHOTAI_API_KEY
base_url: https://api.kimi.com/coding/v1
headers:
User-Agent: "KimiCLI/1.3"
# Latest K2 models for agentic tasks
- model: moonshotai/kimi-k2-0905-preview
access_key: $MOONSHOTAI_API_KEY