Set gpt5 max tokens to 8_192 to fix context window exceeded error (#5478)

* Set gpt5 max tokens to 8_192 to fix context window exceeded error

* Create healthy-crabs-sip.md
This commit is contained in:
Saoud Rizwan authored and GitHub committed 2025-08-11 15:50:32 -07:00
1 parent 669e018b85
commit 2cf1d8628b
3 files changed
+15 -4

No files matched your search

@@ -115,6 +115,12 @@ export async function refreshOpenRouterModels(
modelInfo.outputPrice = 3
modelInfo.contextWindow = 131_000
break
case "openai/gpt-5":
case "openai/gpt-5-chat":
case "openai/gpt-5-mini":
case "openai/gpt-5-nano":
modelInfo.maxTokens = 8_192 // 128000 breaks context window truncation
break
default:
if (rawModel.id.startsWith("openai/")) {
modelInfo.cacheReadsPrice = parsePrice(rawModel.pricing?.input_cache_read)