fix OpenAI max_token config read

This commit is contained in:
Jochen
2025-11-10 11:58:34 +11:00
parent f8906ef62b
commit dce0d08f8c

View File

@@ -1033,7 +1033,10 @@ impl<W: UiWriter> Agent<W> {
config.agent.fallback_default_max_tokens as u32 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" => { "anthropic" => {
// Claude models have large context windows // Claude models have large context windows
// Use configured max_tokens or fall back to default // Use configured max_tokens or fall back to default