MCPcopy Create free account
hub / github.com/Noumena-Network/code / modelSupportsToolReference

Function modelSupportsToolReference

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

Source from the content-addressed store, hash-verified

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

Callers 3

isToolSearchEnabledFunction · 0.85

Tested by

no test coverage detected