Skip to content

Enable native tool calling for DeepSeek, Google, Mistral (#525) - #527

Merged
joelteply merged 1 commit into
mainfrom
fix/deepseek-native-tools
Mar 26, 2026
Merged

joelteply merged 1 commit into
mainfrom
fix/deepseek-native-tools

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

DeepSeek personas couldnt see real tools — they were getting XML in prompt instead of native function schemas. DeepSeek supports OpenAI-compatible function calling.

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.
Copilot AI review requested due to automatic review settings March 26, 2026 15:37
@joelteply
joelteply merged commit e84072c into main Mar 26, 2026
@joelteply
joelteply deleted the fix/deepseek-native-tools branch March 26, 2026 15:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and mistral to 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.

Comment on lines +962 to 963
const nativeToolProviders = ['anthropic', 'openai', 'azure', 'together', 'groq', 'fireworks', 'xai', 'deepseek', 'google', 'mistral'];
return nativeToolProviders.includes(provider.toLowerCase());

Copilot AI Mar 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +968 to +969
* - '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)

Copilot AI Mar 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
* - '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)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants