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