fix(moonshot): add reasoning_content field support for Kimi models (#11806)
Kimi-K2.5 returns 400 errors when thinking is enabled because reasoning_content is missing from assistant tool call messages. This adds the supportsReasoningContentField flag (as a getter gated on kimi-* models) matching the existing DeepSeek fix, so legacy moonshot-v1-* models are unaffected. Fixes #11600 Fixes #11711
This commit is contained in:
parent
f7437593fd
commit
3fdf35e0c1
1 changed files with 7 additions and 0 deletions
|
|
@ -6,6 +6,13 @@ import OpenAI from "./OpenAI.js";
|
|||
|
||||
class Moonshot extends OpenAI {
|
||||
static providerName = "moonshot";
|
||||
|
||||
constructor(options: LLMOptions) {
|
||||
super(options);
|
||||
this.supportsReasoningContentField =
|
||||
this.model?.startsWith("kimi") ?? false;
|
||||
}
|
||||
|
||||
static defaultOptions: Partial<LLMOptions> = {
|
||||
apiBase: "https://api.moonshot.cn/v1/",
|
||||
model: "moonshot-v1-8k",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue