Skip to main content
The gateway supports OpenAI-style tool calling. Define tools in the request, receive tool_calls in the response, send tool results back with the tool role. Any OpenAI SDK works unmodified. Every model in the catalog supports tool calling — models without tool support are not listed.

How PHI protection applies

Tool calling adds two hops where identifiers could leak. The gateway covers both:
  1. Outbound: message content and your tool role results are redacted before the model sees them.
  2. Inbound: tool_calls arguments come back re-hydrated, so your function receives real values, not placeholders.

Define and call a tool

Return the tool result

Append the assistant turn and your result, then call again:
Your tool result passes through the same redaction as user messages. If the result contains patient identifiers, the model still sees placeholders.
Streamed tool calls: streamed responses (stream: true) do not support tools; run tool calls unstreamed. Placeholder re-hydration needs the complete arguments before it can restore values safely.

Errors

See Errors & limits for the full contract.