|
|
@@ -476,6 +476,13 @@ export namespace ProviderTransform {
|
|
|
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) {
|
|
|
result["promptCacheKey"] = sessionID
|
|
|
}
|