You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please explain the motivation behind the feature request.
Add Kimi (Moonshot AI) as a first-class LLM provider, connecting directly to the Moonshot API. Kimi K2 is a strong long-context (256k) agentic/coding model family that several users want to use directly with their own Moonshot API key, without routing through a third party.
Today Kimi is only reachable indirectly via OpenRouter — crates/biorouter/src/providers/openrouter.rs lists moonshotai/kimi-k2.7-code and moonshotai/kimi-k2.6. There is no direct Moonshot provider: no MOONSHOT_API_KEY provider entry, so a user with a native Moonshot account can't point Biorouter at api.moonshot.ai and pay Moonshot directly.
What's already in place — this is a small addition, not a from-scratch integration:
The Kimi models and their context windows are already in the model registry (crates/biorouter/src/model.rs): moonshotai/kimi-k2.6, moonshotai/kimi-k2.7-code (262k) around L188–190, and kimi-k2.7 / kimi-k2.5 / kimi-k2.6 (262k) + kimi-k2 (131k) around L342–346, under a ── Moonshot Kimi ── comment.
The Moonshot API is OpenAI-compatible (/v1/chat/completions), so it fits Biorouter's existing OpenAI-engine plumbing directly.
Describe the solution you'd like
Add a direct Moonshot (Kimi) provider keyed by MOONSHOT_API_KEY, pointed at https://api.moonshot.ai/v1 (international) — with https://api.moonshot.cn/v1 as the China endpoint, ideally overridable like other providers' hosts.
Two clean implementation paths already exist in the tree:
Declarative provider (lowest effort). Drop a crates/biorouter/src/providers/declarative/moonshot.json next to the existing deepseek.json / groq.json / mistral.json / inception.json. It's auto-registered by register_declarative_providers (crates/biorouter/src/config/declarative_providers.rs). Shape mirrors deepseek.json:
Native provider (like crates/biorouter/src/providers/zai.rs / xai.rs / venice.rs) if a curated known-models list, pricing, or a host override is wanted: MOONSHOT_API_HOST default https://api.moonshot.ai/v1, secret MOONSHOT_API_KEY, default model kimi-k2.7, then register it in crates/biorouter/src/providers/factory.rs alongside ZaiProvider / XaiProvider.
Either way, wire it into provider ordering / the onboarding + settings provider grid (Institutional/Commercial section) so it's discoverable, and align the exposed model IDs with the Moonshot platform's actual names (e.g. the kimi-k2* families) and the entries already in model.rs.
Describe alternatives you've considered
Use Kimi via OpenRouter (works today) — but it forces OpenRouter billing/keys and an extra hop, instead of a direct Moonshot account; latency and cost differ, and some users specifically have Moonshot credits.
The generic "custom OpenAI-compatible provider" path — a user can hand-configure a base URL + key, but that's undiscoverable, easy to misconfigure (endpoint, model IDs, context windows), and doesn't give Kimi a named, first-class entry with correct context limits (which are already known).
Additional context
Model registry entries to reuse: crates/biorouter/src/model.rs (~L188–190, ~L342–346).
Current indirect access: crates/biorouter/src/providers/openrouter.rs (~L42–43).
Declarative format + loader: crates/biorouter/src/providers/declarative/deepseek.json, crates/biorouter/src/config/declarative_providers.rs.
Native-provider reference: crates/biorouter/src/providers/zai.rs; registration in crates/biorouter/src/providers/factory.rs.
I have verified this does not duplicate an existing feature request
Please explain the motivation behind the feature request.
Add Kimi (Moonshot AI) as a first-class LLM provider, connecting directly to the Moonshot API. Kimi K2 is a strong long-context (256k) agentic/coding model family that several users want to use directly with their own Moonshot API key, without routing through a third party.
Today Kimi is only reachable indirectly via OpenRouter —
crates/biorouter/src/providers/openrouter.rslistsmoonshotai/kimi-k2.7-codeandmoonshotai/kimi-k2.6. There is no direct Moonshot provider: noMOONSHOT_API_KEYprovider entry, so a user with a native Moonshot account can't point Biorouter atapi.moonshot.aiand pay Moonshot directly.What's already in place — this is a small addition, not a from-scratch integration:
crates/biorouter/src/model.rs):moonshotai/kimi-k2.6,moonshotai/kimi-k2.7-code(262k) around L188–190, andkimi-k2.7/kimi-k2.5/kimi-k2.6(262k) +kimi-k2(131k) around L342–346, under a── Moonshot Kimi ──comment./v1/chat/completions), so it fits Biorouter's existing OpenAI-engine plumbing directly.Describe the solution you'd like
Add a direct Moonshot (Kimi) provider keyed by
MOONSHOT_API_KEY, pointed athttps://api.moonshot.ai/v1(international) — withhttps://api.moonshot.cn/v1as the China endpoint, ideally overridable like other providers' hosts.Two clean implementation paths already exist in the tree:
Declarative provider (lowest effort). Drop a
crates/biorouter/src/providers/declarative/moonshot.jsonnext to the existingdeepseek.json/groq.json/mistral.json/inception.json. It's auto-registered byregister_declarative_providers(crates/biorouter/src/config/declarative_providers.rs). Shape mirrorsdeepseek.json:{ "name": "moonshot", "engine": "openai", "display_name": "Moonshot (Kimi)", "description": "Kimi K2 models from Moonshot AI", "api_key_env": "MOONSHOT_API_KEY", "base_url": "https://api.moonshot.ai/v1", "models": [ { "name": "kimi-k2.7", "context_limit": 262144, ... }, ... ], "supports_streaming": true }Native provider (like
crates/biorouter/src/providers/zai.rs/xai.rs/venice.rs) if a curated known-models list, pricing, or a host override is wanted:MOONSHOT_API_HOSTdefaulthttps://api.moonshot.ai/v1, secretMOONSHOT_API_KEY, default modelkimi-k2.7, then register it incrates/biorouter/src/providers/factory.rsalongsideZaiProvider/XaiProvider.Either way, wire it into provider ordering / the onboarding + settings provider grid (Institutional/Commercial section) so it's discoverable, and align the exposed model IDs with the Moonshot platform's actual names (e.g. the
kimi-k2*families) and the entries already inmodel.rs.Describe alternatives you've considered
Additional context
Model registry entries to reuse:
crates/biorouter/src/model.rs(~L188–190, ~L342–346).Current indirect access:
crates/biorouter/src/providers/openrouter.rs(~L42–43).Declarative format + loader:
crates/biorouter/src/providers/declarative/deepseek.json,crates/biorouter/src/config/declarative_providers.rs.Native-provider reference:
crates/biorouter/src/providers/zai.rs; registration incrates/biorouter/src/providers/factory.rs.I have verified this does not duplicate an existing feature request