Summary
Add a GBrain provider recipe for Kimi / Moonshot AI as an OpenAI-compatible chat + expansion provider.
Kimi exposes an OpenAI-compatible API endpoint and can be used for GBrain's non-embedding LLM surfaces such as query expansion, chat, facts extraction, and dream synthesis.
Motivation
GBrain already has a recipe architecture for OpenAI-compatible providers such as DeepSeek, Groq, Together, Zhipu, DashScope, and others. Kimi / Moonshot is a common frontier model choice for agent workloads and should be configurable through the same provider mechanism.
This would allow configs such as:
gbrain config set models.tier.utility kimi:kimi-k2.6
gbrain config set models.tier.reasoning kimi:kimi-k2.6
gbrain config set models.tier.deep kimi:kimi-k2.6
gbrain config set models.expansion kimi:kimi-k2.6
gbrain config set models.chat kimi:kimi-k2.6
gbrain config set facts.extraction_model kimi:kimi-k2.6
gbrain config set models.dream.synthesize kimi:kimi-k2.6
Proposed provider recipe
Add something along these lines:
export const kimi: Recipe = {
id: 'kimi',
name: 'Kimi (Moonshot AI)',
tier: 'openai-compat',
implementation: 'openai-compatible',
base_url_default: 'https://api.moonshot.ai/v1',
auth_env: {
required: ['MOONSHOT_API_KEY'],
setup_url: 'https://platform.moonshot.ai/',
},
touchpoints: {
expansion: {
models: [
'kimi-k2.6',
'kimi-k2.5',
'kimi-k2-turbo-preview',
'kimi-k2-thinking',
],
},
chat: {
models: [
'kimi-k2.6',
'kimi-k2.5',
'kimi-k2-turbo-preview',
'kimi-k2-thinking',
],
supports_tools: true,
supports_subagent_loop: false,
supports_prompt_cache: false,
max_context_tokens: 256000,
},
},
setup_hint: 'Get an API key at https://platform.moonshot.ai/, then `export MOONSHOT_API_KEY=...`',
};
Expected code changes:
- Add
src/core/ai/recipes/kimi.ts
- Register it in
src/core/ai/recipes/index.ts
- Surface
MOONSHOT_API_KEY in provider env discovery/listing
- Add provider recipe smoke/contract coverage if applicable
Scope
This issue is intentionally scoped to adding the Kimi provider recipe for chat + expansion.
It does not attempt to solve models.tier.subagent routing. That is covered by related issues such as:
Once the subagent provider abstraction is generalized, Kimi can be evaluated separately for subagent/tool-loop support. For this issue, supports_subagent_loop can stay false to avoid overclaiming compatibility.
References
Summary
Add a GBrain provider recipe for Kimi / Moonshot AI as an OpenAI-compatible chat + expansion provider.
Kimi exposes an OpenAI-compatible API endpoint and can be used for GBrain's non-embedding LLM surfaces such as query expansion, chat, facts extraction, and dream synthesis.
Motivation
GBrain already has a recipe architecture for OpenAI-compatible providers such as DeepSeek, Groq, Together, Zhipu, DashScope, and others. Kimi / Moonshot is a common frontier model choice for agent workloads and should be configurable through the same provider mechanism.
This would allow configs such as:
Proposed provider recipe
Add something along these lines:
Expected code changes:
src/core/ai/recipes/kimi.tssrc/core/ai/recipes/index.tsMOONSHOT_API_KEYin provider env discovery/listingScope
This issue is intentionally scoped to adding the Kimi provider recipe for chat + expansion.
It does not attempt to solve
models.tier.subagentrouting. That is covered by related issues such as:Once the subagent provider abstraction is generalized, Kimi can be evaluated separately for subagent/tool-loop support. For this issue,
supports_subagent_loopcan stayfalseto avoid overclaiming compatibility.References