mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Fix rounding of max tokens (#6808)
This commit is contained in:
parent
212297755f
commit
518c558d56
1 changed files with 1 additions and 1 deletions
|
|
@ -92,7 +92,7 @@ export const getModelMaxOutputTokens = ({
|
|||
|
||||
// If model has explicit maxTokens, clamp it to 20% of the context window
|
||||
if (model.maxTokens) {
|
||||
return Math.min(model.maxTokens, model.contextWindow * 0.2)
|
||||
return Math.min(model.maxTokens, Math.ceil(model.contextWindow * 0.2))
|
||||
}
|
||||
|
||||
// For non-Anthropic formats without explicit maxTokens, return undefined
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue