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 b43977c commit 6f63d7eCopy full SHA for 6f63d7e
webview-ui/src/utils/model-utils.ts
@@ -100,9 +100,7 @@ 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 defaultReserved = Math.ceil(safeContextWindow * 0.2)
104
- const reservedForOutput =
105
- maxTokens && maxTokens > 0 && maxTokens === safeContextWindow ? defaultReserved : (maxTokens ?? defaultReserved)
+ const reservedForOutput = maxTokens && maxTokens > 0 ? maxTokens : Math.ceil(safeContextWindow * 0.2)
106
107
// Calculate sizes directly without buffer display
108
const availableSize = Math.max(0, safeContextWindow - safeContextTokens - reservedForOutput)
0 commit comments