From 8c8df94a00a05812852f6c296f9d905fca327b79 Mon Sep 17 00:00:00 2001 From: Ari Webb Date: Tue, 13 Jan 2026 11:23:37 -0800 Subject: [PATCH] fix: enable zai parallel tool calls (#530) --- src/agent/modify.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/agent/modify.ts b/src/agent/modify.ts index b22e64d..75bef83 100644 --- a/src/agent/modify.ts +++ b/src/agent/modify.ts @@ -30,6 +30,7 @@ function buildModelSettings( const isAnthropic = modelHandle.startsWith("anthropic/") || modelHandle.startsWith(`${ANTHROPIC_PROVIDER_NAME}/`); + const isZai = modelHandle.startsWith("zai/"); const isGoogleAI = modelHandle.startsWith("google_ai/"); const isGoogleVertex = modelHandle.startsWith("google_vertex/"); const isOpenRouter = modelHandle.startsWith("openrouter/"); @@ -70,6 +71,13 @@ function buildModelSettings( }; } settings = anthropicSettings; + } else if (isZai) { + // Zai uses the same model_settings structure as other providers. + // Ensure parallel_tool_calls is enabled. + settings = { + provider_type: "zai", + parallel_tool_calls: true, + }; } else if (isGoogleAI) { const googleSettings: GoogleAIModelSettings & { temperature?: number } = { provider_type: "google_ai",