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