feat: add tool call support for moonshot models
This commit is contained in:
parent
cab9ce70e0
commit
125a7d795f
2 changed files with 17 additions and 0 deletions
|
|
@ -188,6 +188,7 @@ function autodetectTemplateType(model: string): TemplateType | undefined {
|
|||
lower.includes("gemini") ||
|
||||
lower.includes("grok") ||
|
||||
lower.includes("moonshot") ||
|
||||
lower.includes("kimi") ||
|
||||
lower.includes("mercury") ||
|
||||
/^o\d/.test(lower)
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -285,6 +285,22 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =
|
|||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
moonshot: (model) => {
|
||||
// support moonshot models
|
||||
// https://platform.moonshot.ai/docs/pricing/chat#concepts
|
||||
if (
|
||||
model.toLowerCase().startsWith("kimi") &&
|
||||
model.toLowerCase() !== "kimi-thinking-preview"
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (model.toLowerCase().startsWith("moonshot")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue