* Get the list of model patterns that do NOT support tool_reference. * Can be configured via GrowthBook for live updates without code changes.
()
| 208 | * Can be configured via GrowthBook for live updates without code changes. |
| 209 | */ |
| 210 | function getUnsupportedToolReferencePatterns(): string[] { |
| 211 | try { |
| 212 | // Try to get from GrowthBook for live configuration |
| 213 | const patterns = getFeatureValue_CACHED_MAY_BE_STALE<string[] | null>( |
| 214 | 'tengu_tool_search_unsupported_models', |
| 215 | null, |
| 216 | ) |
| 217 | if (patterns && Array.isArray(patterns) && patterns.length > 0) { |
| 218 | return patterns |
| 219 | } |
| 220 | } catch { |
| 221 | // GrowthBook not ready, use defaults |
| 222 | } |
| 223 | return DEFAULT_UNSUPPORTED_MODEL_PATTERNS |
| 224 | } |
| 225 | |
| 226 | /** |
| 227 | * Check if a model supports tool_reference blocks (required for tool search). |
no test coverage detected