Elffuss BraidHub

kikocis/continue public

main · 667 BRawPermalink
1/**
2 * Determines if a model is recommended for use with `cn`
3 */
4export function isModelCapable(
5 provider: string,
6 name: string,
7 model?: string,
8): boolean {
9 // Check both name and model properties
10 const normalizedName = name.toLowerCase();
11 const normalizedModel = model ? model.toLowerCase() : "";
12
13 const patterns = [/gemini/, /claude/, /gpt/, /o\d/, /kimi/, /qwen/];
14
15 // If either name OR model matches any of the patterns, consider it capable
16 if (patterns.some((pattern) => pattern.test(normalizedName))) {
17 return true;
18 }
19
20 if (model && patterns.some((pattern) => pattern.test(normalizedModel))) {
21 return true;
22 }
23
24 return false;
25}