MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getAutoToolSearchTokenThreshold

Function getAutoToolSearchTokenThreshold

src/utils/toolSearch.ts:104–109  ·  view source on GitHub ↗

* Get the token threshold for auto-enabling tool search for a given model.

(model: string)

Source from the content-addressed store, hash-verified

102 * Get the token threshold for auto-enabling tool search for a given model.
103 */
104function 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.

Callers 2

checkAutoThresholdFunction · 0.85

Calls 3

getMergedBetasFunction · 0.85
getContextWindowForModelFunction · 0.85

Tested by

no test coverage detected