Provider Compatibility
Per-provider matrix for tool use, parallel calls, streaming, and prompt caching
The Gateway normalizes every provider to OpenAI chat-completions semantics. This page covers what each provider does natively and which quirks the Gateway hides.
Tool-use matrix
| Provider | Tool use | Parallel calls | Streaming deltas | strict:true | Forced tool_choice | Prompt caching | Known quirks |
|---|---|---|---|---|---|---|---|
| Anthropic Claude | ✅ | ✅ | ✅ arg-by-arg | ✅ server-side validation | ✅ "required" + named | ✅ ephemeral | toolu_XXX IDs are prefixed with call_ by the Gateway for OpenAI-client compatibility. |
| Google Gemini | ✅ | ✅ | ✅ whole-object (args don't chunk) | ✅ server-side validation | ✅ "required" + named | — | JSON schemas are sanitized before forwarding: additionalProperties, $ref, $schema, $defs, strict, and similar draft-meta keywords are dropped with a warning. IDs are synthesized as call_<uuid>. A thinkingBudget cap is applied to prevent reasoning tokens from eating the output budget. |
| OpenAI | ✅ | ✅ | ✅ arg-by-arg | ✅ passthrough | ✅ "required" + named (passthrough) | ✅ automatic (>1024 tok) | Passthrough. |
| xAI Grok | ✅ | ✅ | ✅ arg-by-arg | ✅ server-side validation | ✅ "required" + named | — | Passthrough via OpenAI-compat endpoint. |
| DeepSeek (chat) | ✅ | ✅ | ✅ arg-by-arg | ✅ server-side validation | ✅ "required" + named | — | deepseek-reasoner / deepseek-r1 do not support tools — returns tool_unsupported_for_model. Use deepseek-chat. |
| Mistral | ✅ | ✅ | ✅ arg-by-arg | ✅ server-side validation | ✅ "required" + named | — | Passthrough. |
| Kimi (Moonshot) | ✅ | provider-dependent | ✅ | ✅ server-side validation | ✅ "required" + named | — | Via OpenRouter. |
| Llama (Meta) | ✅ | provider-dependent | ✅ | ✅ server-side validation | provider-dependent | — | Via OpenRouter. Tool support varies per Llama variant. |
| MiniMax (M2.7) | ✅ | ✅ | ✅ | ✅ server-side validation | ✅ "required" + named | — | MiniMax's hosted API is OpenAI-compatible including tools / tool_choice / tool_calls. The model serves XML-format tool calls internally but the wire format is standard OpenAI. |
Reasoning models and tool use
| Model | Tools allowed? |
|---|---|
gpt-5.2 (OpenAI o-series derivative) | ✅ |
claude-opus-4-* | ✅ |
grok-4-1-fast-reasoning | ✅ |
deepseek-reasoner / deepseek-r1 | ❌ — rejected with tool_unsupported_for_model. |
JSON Schema subset
The Gateway validates parameters as a JSON Schema Draft 2020-12 subset with type:"object" at the root. Supported keywords:
type,properties,required,description,enumitems,minItems,maxItemsoneOf,anyOf,allOfpattern,minLength,maxLengthminimum,maximumformat(validation is lenient:uuid,date,date-timechecked loosely)additionalProperties(Claude/OpenAI/Grok/DeepSeek/Mistral; dropped for Gemini)
When a keyword isn't supported by the target provider, the Gateway either drops it with a warning (Gemini) or validates server-side.
Fallback behavior with tool use
When you pass fallback: ["gpt", "gemini"], the Gateway will try fallback providers only before any tool-call delta has been emitted. Once a tool call has streamed, no mid-stream failover is attempted — tool-call IDs and schemas wouldn't align across providers.
- Anthropic 529 before any delta → try
gpt. - Anthropic connection drop after first tool-call delta → surface
tool_provider_error+[DONE].
Guardrails with tool use
Guardrails run on assistant text content only. Tool-call arguments are skipped — they're structured JSON often containing emails, UUIDs, IDs, and search terms that would false-positive against PII rules.
Token usage and cached tokens
The Gateway normalizes usage reporting:
prompt_tokenscounts input tokens including cached-hit tokens, following OpenAI convention. It does not include cache-creation tokens (the first-write turn on Anthropicephemeral).completion_tokenscounts the assistant output, includingtool_callsarguments.prompt_tokens_details.cached_tokensis populated for Anthropic (cache_read_input_tokens) and OpenAI (nativecached_tokens). Other providers report0.
tool_choice shapes
Every provider above accepts the two OpenAI-style forced shapes:
A bad name in the named shape returns tool_choice_invalid.
See also
- Tool use — the request/response contract.
- Streaming — SSE frame grammar.
- Caching with tools — response vs prompt caching.
- Tool-use errors — machine-parseable error codes.
- Models — full list of supported model aliases.