From 55dba121b724e96debec0a9fe79965e1c1d2e856 Mon Sep 17 00:00:00 2001 From: "Dhanji R. Prasanna" Date: Wed, 28 Jan 2026 10:46:36 +1100 Subject: [PATCH] Add GLM-4 to context length defaults (32k) GLM-4 models support 32k context but were falling back to the conservative 4096 default, causing context overflow on startup. --- crates/g3-core/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/g3-core/src/lib.rs b/crates/g3-core/src/lib.rs index 01bfa60..60b2ed3 100644 --- a/crates/g3-core/src/lib.rs +++ b/crates/g3-core/src/lib.rs @@ -663,6 +663,7 @@ impl Agent { match &embedded_config.model_type.to_lowercase()[..] { "codellama" => 16384, // CodeLlama supports 16k context "llama" => 4096, // Base Llama models + "glm4" => 32768, // GLM-4 supports 32k context "mistral" => 8192, // Mistral models "qwen" => 32768, // Qwen2.5 supports 32k context _ => 4096, // Conservative default