Conversation
Signed-off-by: Evanfeenstra <evanfeenstra@gmail.com>
Signed-off-by: Evanfeenstra <evanfeenstra@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR adds native support for the Moonshot AI provider (with Kimi models) to goose, enabling direct integration without relying on OpenRouter or custom provider configurations. The Moonshot provider implements special handling for reasoning content in a format specific to Kimi models that differs from standard OpenAI-compatible APIs.
Changes:
- Adds a new Moonshot provider with support for kimi-k2.5 and kimi-k2-thinking models
- Implements custom format handling for Kimi's reasoning_content field in both streaming and non-streaming responses
- Fixes a bug where CLI builtin extensions were incorrectly flagged as missing during session resume
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/goose/src/providers/moonshot.rs | New provider implementation with OpenAI-compatible API handling and custom error parsing |
| crates/goose/src/providers/formats/moonshot.rs | Custom format handlers for Moonshot's reasoning_content field, including streaming message parsing and tool call handling |
| crates/goose/src/providers/formats/mod.rs | Registers moonshot format module |
| crates/goose/src/providers/mod.rs | Registers moonshot provider module |
| crates/goose/src/providers/factory.rs | Adds MoonshotProvider to the provider registry |
| crates/goose-cli/src/session/builder.rs | Fixes false "missing extension" warnings for builtin extensions during session resume |
441223f to
31a6602
Compare
Signed-off-by: Evanfeenstra <evanfeenstra@gmail.com>
Signed-off-by: Evanfeenstra <evanfeenstra@gmail.com>
michaelneale
left a comment
There was a problem hiding this comment.
thanks - I think this makes sense. Moonshot kimi 2.5 work via openrouter etc but a challengfe direct, and it is big enough to warrant it with current architecture IMO
|
before we merge this, can we think about whether we can do this with a custom provider? I see we need changes to the formatter, but can we add custom rendering so we can accomplish that? the provider code itself looks like a fairily standard openai provider? making it easier to add custom/declarative providers makes the whole system stronger! |
Summary
Added
moonshotprovider. Since kimi reasoning output is in a different format that other models, it cant be added as a custom providerType of Change
AI Assistance
Testing
Related Issues
Relates to #ISSUE_ID
Discussion: LINK (if any)
Screenshots/Demos (for UX changes)
Before:
After: