Skip to content

Commit 6f63d7e

Browse files
committed
Revert this
1 parent b43977c commit 6f63d7e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

webview-ui/src/utils/model-utils.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,7 @@ export const calculateTokenDistribution = (
100100

101101
// Get the actual max tokens value from the model
102102
// 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)
103+
const reservedForOutput = maxTokens && maxTokens > 0 ? maxTokens : Math.ceil(safeContextWindow * 0.2)
106104

107105
// Calculate sizes directly without buffer display
108106
const availableSize = Math.max(0, safeContextWindow - safeContextTokens - reservedForOutput)

0 commit comments

Comments
 (0)