Repository navigation
Enable native tool calling for DeepSeek, Google, Mistral (#525) - #527
Conversation
DeepSeek supports OpenAI-compatible function calling but was excluded from the native tool list. Personas using DeepSeek got XML tools in the system prompt which the LLM treated as context text (not callable functions), causing hallucinated tool names. With native protocol, tools appear as real function schemas that the LLM knows it can call. This should fix #525 for DeepSeek-backed personas. Contributes to #525, #526.
There was a problem hiding this comment.
Pull request overview
This PR updates tool-capability detection so additional providers are treated as supporting native (structured) tool calling, addressing cases where DeepSeek personas were receiving XML tool definitions instead of native function schemas.
Changes:
- Add
deepseek,google, andmistralto the provider allowlist for native tool calling (supportsNativeTools()). - Update the ToolCapability tier documentation to reflect the expanded set of “native” providers and narrow the “xml” description.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const nativeToolProviders = ['anthropic', 'openai', 'azure', 'together', 'groq', 'fireworks', 'xai', 'deepseek', 'google', 'mistral']; | ||
| return nativeToolProviders.includes(provider.toLowerCase()); |
There was a problem hiding this comment.
supportsNativeTools() now treats mistral as a native-tool provider, but this repo doesn’t appear to register any Mistral inference adapter (only a fine-tuning adapter exists). If provider='mistral' is ever used for text generation, this will route the system into the native tool protocol (and skip text-based parsing), likely breaking tool use. Either add/register a Mistral inference adapter (OpenAI-compatible) or remove mistral from this list until inference is supported.
| * - 'native': JSON tool_use blocks (Anthropic, OpenAI, Azure, Together, Groq, Fireworks, xAI, DeepSeek, Google, Mistral) | ||
| * - 'xml': XML tool calls parsed by ToolCallParser (local models, Candle) |
There was a problem hiding this comment.
The 'native' capability description says “JSON tool_use blocks”, but OpenAI-compatible providers (including DeepSeek/Google here) use tools + tool_calls on the wire. Consider rewording this to reflect structured/native tool calling generally (OpenAI tool_calls / Anthropic tool_use) so the comment doesn’t imply a single provider-specific response format.
| * - 'native': JSON tool_use blocks (Anthropic, OpenAI, Azure, Together, Groq, Fireworks, xAI, DeepSeek, Google, Mistral) | |
| * - 'xml': XML tool calls parsed by ToolCallParser (local models, Candle) | |
| * - 'native': Structured/native tool calling with JSON (e.g. OpenAI tools + tool_calls, | |
| * Anthropic tool_use, and other compatible function/tool calling APIs) | |
| * - 'xml': XML / text-based tool calls parsed by ToolCallParser (e.g. local models, Candle) |
DeepSeek personas couldnt see real tools — they were getting XML in prompt instead of native function schemas. DeepSeek supports OpenAI-compatible function calling.