From dce0d08f8c8c721c6dea8d8ec172a8946bf2eb02 Mon Sep 17 00:00:00 2001 From: Jochen Date: Mon, 10 Nov 2025 11:58:34 +1100 Subject: [PATCH] fix OpenAI max_token config read --- crates/g3-core/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/g3-core/src/lib.rs b/crates/g3-core/src/lib.rs index a3d248f..0560534 100644 --- a/crates/g3-core/src/lib.rs +++ b/crates/g3-core/src/lib.rs @@ -1033,7 +1033,10 @@ impl Agent { config.agent.fallback_default_max_tokens as u32 } } - "openai" => 192000, + "openai" => { + // gpt-5 has 400k window + get_provider_max_tokens(config, "openai").unwrap_or(400000) + } "anthropic" => { // Claude models have large context windows // Use configured max_tokens or fall back to default