(modelName: string)
| 488 | }; |
| 489 | |
| 490 | export function isRecommendedAgentModel(modelName: string): boolean { |
| 491 | // AND behavior |
| 492 | const recs: RegExp[][] = [ |
| 493 | [/o[134]/], |
| 494 | [/deepseek/, /r1|reasoner/], |
| 495 | [/gemini/, /2\.5/, /pro/], |
| 496 | [/gemini/, /3\.1-pro|3-flash-preview/], |
| 497 | [/gpt-[5-9]/], |
| 498 | [/gpt-4\.1/], |
| 499 | [/codex/], |
| 500 | [/claude/, /sonnet/, /3\.7|3-7|(?<!\d)-[4-9]/], |
| 501 | [/claude/, /opus/, /(?<!\d)-[4-9]/], |
| 502 | [/grok-code/], |
| 503 | [/grok-[4-9][\.-]\d/], |
| 504 | [/claude/, /[4-9]-[5-9]/], |
| 505 | ]; |
| 506 | for (const combo of recs) { |
| 507 | if (combo.every((regex) => modelName.toLowerCase().match(regex))) { |
| 508 | return true; |
| 509 | } |
| 510 | } |
| 511 | return false; |
| 512 | } |
| 513 | export function modelSupportsNativeTools(modelDescription: ModelDescription) { |
| 514 | if (modelDescription.capabilities?.tools !== undefined) { |
| 515 | return modelDescription.capabilities.tools; |
no outgoing calls
no test coverage detected