tweak: for zai ensure clear_thinking is false
This commit is contained in:
@@ -476,6 +476,13 @@ export namespace ProviderTransform {
|
|||||||
result["chat_template_args"] = { enable_thinking: true }
|
result["chat_template_args"] = { enable_thinking: true }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (["zai", "zhipuai"].includes(model.providerID) && model.api.npm === "@ai-sdk/openai-compatible") {
|
||||||
|
result["thinking"] = {
|
||||||
|
type: "enabled",
|
||||||
|
clear_thinking: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (model.providerID === "openai" || providerOptions?.setCacheKey) {
|
if (model.providerID === "openai" || providerOptions?.setCacheKey) {
|
||||||
result["promptCacheKey"] = sessionID
|
result["promptCacheKey"] = sessionID
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user