From 42f9693f383c7771cbb85ccf69bd2d892f20e999 Mon Sep 17 00:00:00 2001 From: wsp Date: Wed, 11 Feb 2026 22:48:10 +0800 Subject: [PATCH] feat: support tool streaming for glm-5 --- src/crates/core/src/infrastructure/ai/client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crates/core/src/infrastructure/ai/client.rs b/src/crates/core/src/infrastructure/ai/client.rs index 5594fcf5..35d5505c 100644 --- a/src/crates/core/src/infrastructure/ai/client.rs +++ b/src/crates/core/src/infrastructure/ai/client.rs @@ -215,7 +215,7 @@ impl AIClient { let model_name = self.config.model.to_lowercase(); - if model_name == "glm-4.6" || model_name == "glm-4.7" { + if model_name == "glm-4.6" || model_name == "glm-4.7" || model_name == "glm-5" { request_body["tool_stream"] = serde_json::Value::Bool(true); } @@ -276,7 +276,7 @@ impl AIClient { let model_name = self.config.model.to_lowercase(); // TODO: Zhipu tool streaming currently only supports the OpenAI format - if model_name == "glm-4.6" || model_name == "glm-4.7" { + if model_name == "glm-4.6" || model_name == "glm-4.7" || model_name == "glm-5" { request_body["tool_stream"] = serde_json::Value::Bool(true); }