MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / looksLikeToolCallCapable

Function looksLikeToolCallCapable

src/setup/model-detector.ts:184–206  ·  view source on GitHub ↗

Heuristic: does this model id look like it has native tool-call training?

(id: string)

Source from the content-addressed store, hash-verified

182
183/** Heuristic: does this model id look like it has native tool-call training? */
184function looksLikeToolCallCapable(id: string): boolean {
185 const lower = id.toLowerCase();
186 // Known native-tool-calling families
187 if (/qwen3/.test(lower)) return true; // Qwen3 family — strong native support
188 if (/qwen2\.5/.test(lower)) return true; // Qwen 2.5 — works via recovery layer
189 if (/gemma-?4/.test(lower)) return true; // Gemma 4 — native function-calling + system role
190 if (/gemma-?3/.test(lower)) return true; // Gemma 3 — function-calling support
191 if (/llama-?4/.test(lower)) return true; // Llama 4 family
192 if (/llama-?3\.[12]/.test(lower)) return true;
193 if (/llama-?3-/.test(lower)) return true;
194 if (/mistral/.test(lower) && !/codestral/.test(lower)) return true;
195 if (/mixtral/.test(lower)) return true;
196 if (/deepseek-v3/.test(lower)) return true;
197 if (/deepseek-r1/.test(lower)) return true;
198 if (/nemotron/.test(lower)) return true; // NVIDIA Nemotron — agentic/tool-first
199 // Codestral has tool calling on newer versions
200 if (/codestral/.test(lower)) return true;
201 // DeepSeek-V2 / Coder-V2 use a non-standard format — flag as NOT native
202 if (/deepseek-coder-v2/.test(lower)) return false;
203 if (/deepseek-v2/.test(lower)) return false;
204 // Default unknown → false (be conservative, the model may need recovery layer)
205 return false;
206}
207
208/**
209 * Heuristic: does the model id look multimodal (accepts images)? Used so the

Callers 2

detectOllamaModelsFunction · 0.85
detectLMStudioModelsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected