Summary
Kimi is reachable in Buzz today only as an ACP harness (kimi acp, PresetHarness { id: "kimi", label: "Kimi Code" } in desktop/src-tauri/src/managed_agents/discovery/presets.rs). There is no way to run the native Buzz Agent harness on Kimi models (K3 and friends) without hand-editing config files, even though Kimi ships an OpenAI-compatible endpoint that already satisfies Buzz's discovery contract.
I would like to add kimi as a first-class LLM provider for buzz-agent, mirroring the merged OpenRouter work in #1975.
Current behaviour
Settings → Default harness Buzz → Provider OpenAI-compatible → paste a Kimi API key → Model dropdown shows No models found.
Cause: discovery calls {OPENAI_COMPAT_BASE_URL}/models and the var defaults to https://api.openai.com/v1:
// desktop/src-tauri/src/commands/agent_models.rs
fn openai_compatible_models_url_for_discovery(env: &BTreeMap<String, String>) -> String {
let base_url = env_or_process_value(env, "OPENAI_COMPAT_BASE_URL")
.unwrap_or_else(|| "https://api.openai.com/v1".to_string());
format!("{}/models", base_url.trim_end_matches('/'))
}
The Kimi key against api.openai.com returns 401, so the list comes back empty. Injecting OPENAI_COMPAT_BASE_URL=https://api.kimi.com/coding/v1 into global-agent-config.json by hand makes discovery and chat work, which confirms the wire format is compatible — it is purely a discoverability/configuration gap.
(#3798 adds a Base URL field for the generic openai-compat provider. That is complementary: this issue is about a named provider with a baked endpoint, model catalog and effort mapping, the same treatment OpenRouter got.)
Endpoint facts (verified against the live API)
GET https://api.kimi.com/coding/v1/models → 200, returns k3 (1M context, think_efforts: ["low","high","max"], default high), k3-256k, kimi-for-coding, kimi-for-coding-highspeed.
POST /chat/completions → standard OpenAI chat shape; reasoning_effort accepted; replies carry reasoning_content plus usage.completion_tokens_details.reasoning_tokens.
- Bearer auth, so
provider.required_env / bearer_auth paths need no special-casing.
Proposal
Follow the shape of #1975 (feat: add first-class OpenRouter provider support):
crates/buzz-agent/src/config.rs — Provider::Kimi, resolve "kimi", credential KIMI_API_KEY.
crates/buzz-agent/src/llm.rs — default base URL https://api.kimi.com/coding/v1 (overridable via KIMI_BASE_URL, so platform users can point at their own endpoint), OpenAI chat-completions wire format, reasoning_content handling.
desktop/src-tauri/src/commands/agent_models*.rs + managed_agents/readiness.rs — live model discovery against /models, required-env wiring.
desktop/src/features/agents/ui/agentConfigOptions.tsx — { id: "kimi", label: "Kimi" } in PERSONA_LLM_PROVIDER_OPTIONS + PROVIDER_CREDENTIAL_CONFIG entry; effort table entry for the low | high | max triple.
crates/buzz-agent/README.md + unit tests alongside the existing provider tests.
Related
Offer
Happy to implement and open the PR (DCO signed off, Conventional Commit title, just ci green) if a maintainer confirms the approach — in particular whether the default endpoint should be the Kimi For Coding base (https://api.kimi.com/coding/v1) or the pay-per-token platform base, with the other reachable via KIMI_BASE_URL.
Summary
Kimi is reachable in Buzz today only as an ACP harness (
kimi acp,PresetHarness { id: "kimi", label: "Kimi Code" }indesktop/src-tauri/src/managed_agents/discovery/presets.rs). There is no way to run the native Buzz Agent harness on Kimi models (K3 and friends) without hand-editing config files, even though Kimi ships an OpenAI-compatible endpoint that already satisfies Buzz's discovery contract.I would like to add
kimias a first-class LLM provider forbuzz-agent, mirroring the merged OpenRouter work in #1975.Current behaviour
Settings → Default harness
Buzz→ ProviderOpenAI-compatible→ paste a Kimi API key → Model dropdown showsNo models found.Cause: discovery calls
{OPENAI_COMPAT_BASE_URL}/modelsand the var defaults tohttps://api.openai.com/v1:The Kimi key against
api.openai.comreturns 401, so the list comes back empty. InjectingOPENAI_COMPAT_BASE_URL=https://api.kimi.com/coding/v1intoglobal-agent-config.jsonby hand makes discovery and chat work, which confirms the wire format is compatible — it is purely a discoverability/configuration gap.(#3798 adds a Base URL field for the generic
openai-compatprovider. That is complementary: this issue is about a named provider with a baked endpoint, model catalog and effort mapping, the same treatment OpenRouter got.)Endpoint facts (verified against the live API)
GET https://api.kimi.com/coding/v1/models→200, returnsk3(1M context,think_efforts: ["low","high","max"], defaulthigh),k3-256k,kimi-for-coding,kimi-for-coding-highspeed.POST /chat/completions→ standard OpenAI chat shape;reasoning_effortaccepted; replies carryreasoning_contentplususage.completion_tokens_details.reasoning_tokens.provider.required_env/bearer_authpaths need no special-casing.Proposal
Follow the shape of #1975 (
feat: add first-class OpenRouter provider support):crates/buzz-agent/src/config.rs—Provider::Kimi, resolve"kimi", credentialKIMI_API_KEY.crates/buzz-agent/src/llm.rs— default base URLhttps://api.kimi.com/coding/v1(overridable viaKIMI_BASE_URL, so platform users can point at their own endpoint), OpenAI chat-completions wire format,reasoning_contenthandling.desktop/src-tauri/src/commands/agent_models*.rs+managed_agents/readiness.rs— live model discovery against/models, required-env wiring.desktop/src/features/agents/ui/agentConfigOptions.tsx—{ id: "kimi", label: "Kimi" }inPERSONA_LLM_PROVIDER_OPTIONS+PROVIDER_CREDENTIAL_CONFIGentry; effort table entry for thelow | high | maxtriple.crates/buzz-agent/README.md+ unit tests alongside the existing provider tests.Related
buzz-agent)Offer
Happy to implement and open the PR (DCO signed off, Conventional Commit title,
just cigreen) if a maintainer confirms the approach — in particular whether the default endpoint should be the Kimi For Coding base (https://api.kimi.com/coding/v1) or the pay-per-token platform base, with the other reachable viaKIMI_BASE_URL.