MCPcopy
hub / github.com/codeaashu/claude-code / modelSupportsToolReference

Function modelSupportsToolReference

src/utils/toolSearch.ts:239–252  ·  view source on GitHub ↗
(model: string)

Source from the content-addressed store, hash-verified

237 * @returns true if the model supports tool_reference, false otherwise
238 */
239export function modelSupportsToolReference(model: string): boolean {
240 const normalizedModel = model.toLowerCase()
241 const unsupportedPatterns = getUnsupportedToolReferencePatterns()
242
243 // Check if model matches any unsupported pattern
244 for (const pattern of unsupportedPatterns) {
245 if (normalizedModel.includes(pattern.toLowerCase())) {
246 return false
247 }
248 }
249
250 // New models are assumed to support tool_reference
251 return true
252}
253
254/**
255 * Check if tool search *might* be enabled (optimistic check).

Callers 3

isToolSearchEnabledFunction · 0.85

Tested by

no test coverage detected