AIVAX

Function interpreter (deprecated)

Deprecated. The function interpreter is kept only for existing gateways. Do not use it in new gateways. Choose a model with native tool calling instead; the Models page of the dashboard lists which models support it.

The function interpreter, also called the tool handler, adds tool calling to models that do not produce reliable native tool calls. Instead of sending the tool definitions to the provider, AIVAX asks the model to choose a tool in a text format and converts its answer into a tool call. Configure it in Tool calling handler in the gateway editor or in parameters.knownToolHandlerName.

Values #

ValueBehavior
native or nullUses the model’s native tool calling. This is the default and the recommended value.
react.v1.selfcallUses a ReAct-style interpreter that runs on the same model as the gateway.

Any other value makes requests to the gateway fail.

How react.v1.selfcall works #

On every generation in which tools are available, the interpreter runs before the main generation:

  1. AIVAX makes an extra call to the same model with the conversation, the tool definitions as text, and instructions to either pick one tool and its arguments or answer the user.
  2. If the model picks a tool, AIVAX converts its text into a tool call and runs it like any other tool call: server-side tools run inside AIVAX, and client-side tools are returned to your application.
  3. If the model chooses to answer, the main generation runs without tool definitions.

See Processing pipeline for where this step runs.

Limitations #

  • One tool per step. Parallel tool calls are not possible.
  • More cost and latency. Every generation with tools adds an extra model call, billed like any other inference.
  • Text-based selection. Tool names and arguments are parsed from text, so results depend on how well the model follows the interpreter format.

Migrate away from the interpreter #

  1. Choose a model with native tool calling that fits the gateway’s cost and quality requirements.
  2. Change the gateway model and set the tool calling handler to native, or remove knownToolHandlerName.
  3. Test the gateway’s tool flows, for example with Agentic Tests, before switching production traffic.

Type to search the documentation.