We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2122977 commit 518c558Copy full SHA for 518c558
src/shared/api.ts
@@ -92,7 +92,7 @@ export const getModelMaxOutputTokens = ({
92
93
// If model has explicit maxTokens, clamp it to 20% of the context window
94
if (model.maxTokens) {
95
- return Math.min(model.maxTokens, model.contextWindow * 0.2)
+ return Math.min(model.maxTokens, Math.ceil(model.contextWindow * 0.2))
96
}
97
98
// For non-Anthropic formats without explicit maxTokens, return undefined
0 commit comments