feat(provider): add kimi_coding provider for Kimi Coding Plan
Add a dedicated provider entry for the Kimi Coding Plan endpoint (api.kimi.com/coding) using the Anthropic Messages API transport. - Register kimi_coding with backend=anthropic - Use KIMI_CODING_API_KEY env key to avoid clashing with MOONSHOT_API_KEY - Default api_base set to https://api.kimi.com/coding/v1 so that AnthropicProvider._normalize_base_url() + the SDK produce the correct /coding/v1/messages request path - Keywords include kimi-coding, kimi_coding and kimi-for-coding Closes HKUDS/nanobot#4463
This commit is contained in:
@@ -217,6 +217,7 @@ class ProvidersConfig(Base):
|
||||
ovms: ProviderConfig = Field(default_factory=ProviderConfig) # OpenVINO Model Server (OVMS)
|
||||
gemini: ProviderConfig = Field(default_factory=ProviderConfig)
|
||||
moonshot: ProviderConfig = Field(default_factory=ProviderConfig)
|
||||
kimi_coding: ProviderConfig = Field(default_factory=ProviderConfig) # Kimi Coding Plan (Anthropic Messages API)
|
||||
minimax: ProviderConfig = Field(default_factory=ProviderConfig)
|
||||
minimax_anthropic: ProviderConfig = Field(default_factory=ProviderConfig) # MiniMax Anthropic endpoint (thinking)
|
||||
mistral: ProviderConfig = Field(default_factory=ProviderConfig)
|
||||
|
||||
@@ -417,6 +417,16 @@ PROVIDERS: tuple[ProviderSpec, ...] = (
|
||||
("kimi-k2.7-code-highspeed", {"temperature": 1.0}),
|
||||
),
|
||||
),
|
||||
# Kimi Coding Plan — Anthropic Messages API at api.kimi.com/coding
|
||||
# sk-kimi-* keys; requires User-Agent: claude-code/0.1.0 header.
|
||||
ProviderSpec(
|
||||
name="kimi_coding",
|
||||
keywords=("kimi-coding", "kimi_coding", "kimi-for-coding"),
|
||||
env_key="KIMI_CODING_API_KEY",
|
||||
display_name="Kimi Coding",
|
||||
backend="anthropic",
|
||||
default_api_base="https://api.kimi.com/coding/v1",
|
||||
),
|
||||
# MiniMax: OpenAI-compatible API
|
||||
ProviderSpec(
|
||||
name="minimax",
|
||||
|
||||
Reference in New Issue
Block a user