* Get the token threshold for auto-enabling tool search for a given model.
(model: string)
| 104 | * Get the token threshold for auto-enabling tool search for a given model. |
| 105 | */ |
| 106 | function getAutoToolSearchTokenThreshold(model: string): number { |
| 107 | const betas = getMergedBetas(model) |
| 108 | const contextWindow = getContextWindowForModel(model, betas) |
| 109 | const percentage = getAutoToolSearchPercentage() / 100 |
| 110 | return Math.floor(contextWindow * percentage) |
| 111 | } |
| 112 | |
| 113 | /** |
| 114 | * Get the character threshold for auto-enabling tool search for a given model. |
no test coverage detected