Relay365Multi-model API relay desk
← All desk bulletins
Wire & endpointsEN1 desk reads

Shift Log: Tool-Calling Providers, Contracts, and Verdicts

The shift starts with three provider integrations and one requirement: let an assistant inspect an order, propose a refund, and wait for approval before issuing it. All three can express tool requests. The operational differences appear in their message contracts, schema handling, streaming events, and recovery paths—not in whether a demo can call a weather function.

The shared contract stops before execution

Function calling generally means the model emits a tool name and arguments, while your application validates and executes the request. You return the result so the model can continue. Provider-hosted tools are a separate case: execution may happen inside the provider’s infrastructure rather than your application.

For application-defined tools, treat every generated argument as untrusted input. Validate types, enforce authorization, and require approval for consequential actions. A valid JSON object is not permission to issue a refund, and a schema cannot replace business rules.

OpenAI offers a broad integration starting point

OpenAI’s tool interfaces are a practical starting point when your application already uses its SDKs or when you want access to the wider OpenAI-compatible ecosystem. Be precise about the endpoint: Chat Completions and Responses expose different conversation structures and event models. Code written for one is not automatically a drop-in fit for the other.

Where supported, strict schema modes can reduce argument-shape errors. Check the accepted JSON Schema subset and endpoint-specific requirements rather than assuming any schema will work. Your executor must still handle refusals, incomplete output, unsupported tools, and valid arguments that fail policy checks.

Anthropic makes the tool exchange explicit

Anthropic’s native Messages API represents tool requests as tool-use content blocks and returns application results through tool-result blocks. That structure makes the execution boundary visible, but it also requires an adapter if your application assumes OpenAI-shaped messages.

A tool-use stop condition signals that the model is handing control to your application. Preserve the association between each request and its result, including failures. When evaluating Claude Haiku 4.5, for example, test your actual tool schemas and recovery cases rather than extrapolating from the provider’s message format. A clear protocol does not establish model accuracy.

Gemini needs its own conversation discipline

Gemini’s native interface expresses function calls and responses through structured conversation parts. SDK features may automate parts of the execution loop, but that convenience can obscure where validation, retries, and approval checks belong. Make those boundaries explicit before enabling automatic execution.

For a candidate such as Gemini 2.5 Flash, verify the selected API version, SDK behavior, and supported schema features together. Preserve required conversation metadata when replaying turns, including thought signatures where applicable. An adapter that retains only function names and arguments can discard information needed for a valid continuation.

Compatible endpoints still need a contract test

OpenAI compatibility is useful transport alignment, not proof of identical behavior. Across providers, check tool-choice controls, parallel calls, streaming argument fragments, schema enforcement, and tool-result serialization. A successful non-streaming request does not establish that your streaming executor is safe.

  • Run the same fixtures for ambiguous requests, missing fields, invalid arguments, and tool failures.
  • Test multiple tool calls and match every result to its originating request.
  • Verify timeout recovery without repeating a completed write operation.
  • Record approval decisions and execution outcomes without exposing credentials or sensitive payloads.

Shift verdicts for the integration owner

Choose OpenAI’s interface for an OpenAI-centered stack. It is the natural baseline when existing clients and infrastructure already use that contract. Keep endpoint-specific behavior explicit.

Choose Anthropic’s native interface when explicit tool blocks fit your orchestrator. Accept the adapter work rather than flattening away meaningful conversation structure.

Choose Gemini’s native interface for a Gemini-centered application. Preserve its conversation requirements and audit any SDK-managed execution loop.

Choose a relay when access consolidation is the actual problem. Relay365 is a pay-as-you-go relay desk for multiple model families and works with Claude Code, Codex, Gemini CLI, and OpenAI SDK clients. It can fit a multi-provider evaluation workflow, but verify the required tool features on each routed model and endpoint. Create a Relay365 account to test that fit against your own fixtures before moving production traffic.

The final verdict is operational: prefer the integration that passes your contract tests and preserves execution controls. Provider selection matters; authorization, idempotency, and observable failures remain your responsibility.

Further desk bulletins

Curious how it runs on your own code? Sign up →