(model: string)
| 237 | * @returns true if the model supports tool_reference, false otherwise |
| 238 | */ |
| 239 | export 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). |
no test coverage detected