From c5bfecb2586c5f9971948cf90b2873cc50ee47ae Mon Sep 17 00:00:00 2001 From: Grant Linville Date: Thu, 7 Aug 2025 15:09:49 -0400 Subject: [PATCH] chore: lower default max tokens to 400k Signed-off-by: Grant Linville --- pkg/openai/count.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/openai/count.go b/pkg/openai/count.go index c37bdcfd..3c3de1a9 100644 --- a/pkg/openai/count.go +++ b/pkg/openai/count.go @@ -13,7 +13,7 @@ func init() { tiktoken.SetBpeLoader(tiktoken_loader.NewOfflineLoader()) } -const DefaultMaxTokens = 1_000_000 // This is the limit for GPT-4.1 +const DefaultMaxTokens = 400_000 // This is the limit for GPT-5 func decreaseTenPercent(maxTokens int) int { maxTokens = getBudget(maxTokens)