fix: enable zai parallel tool calls (#530)

This commit is contained in:
Ari Webb
2026-01-13 11:23:37 -08:00
committed by GitHub
parent 7bf0b22dae
commit 8c8df94a00

View File

@@ -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",