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 b69825b commit 8447670Copy full SHA for 8447670
webview-ui/src/utils/model-utils.ts
@@ -100,7 +100,8 @@ export const calculateTokenDistribution = (
100
101
// Get the actual max tokens value from the model
102
// If maxTokens is valid, use it, otherwise reserve 20% of the context window as a default
103
- const reservedForOutput = maxTokens && maxTokens > 0 ? maxTokens : Math.ceil(safeContextWindow * 0.2)
+ const reservedForOutput =
104
+ maxTokens && maxTokens > 0 && maxTokens !== safeContextWindow ? maxTokens : Math.ceil(safeContextWindow * 0.2)
105
106
// Calculate sizes directly without buffer display
107
const availableSize = Math.max(0, safeContextWindow - safeContextTokens - reservedForOutput)
0 commit comments