Merge pull request #20 from dhanji/jochen-fix-openai-maxtokens

fix OpenAI max_token config read
This commit is contained in:
Jochen
2025-11-10 11:59:39 +11:00
committed by GitHub

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