fix(reasoning): add Moonshot/Kimi to reasoning-content provider and model support (#3016)
Two targeted fixes to close the Kimi/Moonshot reasoning gap: 1. chat.rs: add ApiProvider::Moonshot to provider_accepts_reasoning_content so Kimi thinking traces stream as Thinking blocks instead of leaking as plain answer text on Moonshot's native endpoint. 2. models.rs: add kimi-* prefix match to model_supports_reasoning so bare Moonshot-native IDs (kimi-k2.6, kimi-*-thinking, etc.) are recognized as reasoning-capable without requiring the OpenRouter-style moonshotai/ prefix. These two changes together ensure is_reasoning_model_for_stream returns true for Kimi models on Moonshot, fixing the RC dialet gap.
This commit is contained in:
@@ -1996,6 +1996,7 @@ fn provider_accepts_reasoning_content(provider: ApiProvider) -> bool {
|
||||
| ApiProvider::Volcengine
|
||||
| ApiProvider::Arcee
|
||||
| ApiProvider::Sglang
|
||||
| ApiProvider::Moonshot // #3016: Kimi thinking traces use reasoning_content
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -312,6 +312,10 @@ pub fn model_supports_reasoning(model: &str) -> bool {
|
||||
if lower.contains("deepseek") && lower.contains("v4") {
|
||||
return true;
|
||||
}
|
||||
// #3016: Moonshot-native Kimi IDs also emit reasoning_content
|
||||
if lower.starts_with("kimi-") {
|
||||
return true;
|
||||
}
|
||||
matches!(
|
||||
lower.as_str(),
|
||||
"arcee-ai/trinity-large-thinking"
|
||||
|
||||
Reference in New Issue
Block a user