MCPcopy Index your code
hub / github.com/continuedev/continue / isModelCapable

Function isModelCapable

extensions/cli/src/utils/modelCapability.ts:4–36  ·  view source on GitHub ↗
(
  provider: string,
  name: string,
  model?: string,
)

Source from the content-addressed store, hash-verified

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 = [
14 /gemini/,
15 /claude/,
16 /gpt/,
17 /o\d/,
18 /kimi/,
19 /qwen/,
20 /llama/,
21 /nemotron/,
22 /grok/,
23 /mistral/,
24 ];
25
26 // If either name OR model matches any of the patterns, consider it capable
27 if (patterns.some((pattern) => pattern.test(normalizedName))) {
28 return true;
29 }
30
31 if (model && patterns.some((pattern) => pattern.test(normalizedModel))) {
32 return true;
33 }
34
35 return false;
36}

Callers 3

getAllAvailableToolsFunction · 0.85
IntroMessageFunction · 0.85

Calls 1

testMethod · 0.80

Tested by

no test coverage detected