Skip to main content
Tool calling works exactly like OpenAI’s function-calling API - the same tools array, the same tool_calls shape in the response. What’s different is what happens underneath: as soon as a request includes tools, Routor filters to tool-capable models and reranks them by measured function-calling accuracy (BFCL - Berkeley Function Calling Leaderboard) for the specific kind of tool use in that request, not just by price.

Basic Request

This is unmodified OpenAI tool-calling shape - if you already have tool-calling code against OpenAI, pointing it at Routor requires no changes beyond the base URL and key.

What Happens Differently

The instant a request has a non-empty tools array, Routor:
  1. Filters the candidate chain to tool-capable models only (same as it filters to vision-capable models when an image is attached)
  2. Classifies the kind of tool use - a single expected call, a web-search-shaped tool, a memory/vector-store tool, several tools that might fire in parallel, or a multi-turn tool conversation already in progress - and reranks the remaining candidates by that scenario’s BFCL score specifically, not a generic overall score
  3. Still applies the normal difficulty scoring on top - a one-tool weather lookup and a multi-step agentic tool chain don’t land on the same tier just because both have tools set
The practical effect: two requests with the same tool definitions but different complexity can route to different models, and the model chosen is one that’s actually measured to be good at tool calls in that shape, not just the cheapest model that technically supports function calling.

Requiring a Minimum Tool-Calling Quality

If your use case can’t tolerate a weak tool-caller (an agent loop where a malformed call breaks the next step, for example), set a floor directly in the request:
Models below that BFCL score for the request’s scenario are dropped from the candidate chain entirely - see the API reference for the exact field name and behavior if it’s changed since this was written. The same constraint can be set permanently on a routing profile instead of every request, so an API key always enforces it.

Debugging a Tool-Routing Decision

POST /v1/routing/debug accepts the same tools array and returns the scenario it detected and the BFCL score of the model it would pick, without spending a real request:

Where to Go Next