Advisor
Consult a stronger model mid-generation as a server tool
Consult a stronger model mid-generation as a server tool
Server tools are currently in beta. The API and behavior may change.
The openrouter:advisor server tool lets a model consult a higher-intelligence advisor model mid-generation. When your model hits a decision point — before committing to an approach, when it’s stuck, or before declaring a task done — it invokes the tool with a prompt. The advisor model thinks, returns its guidance as the tool result, and your model continues, informed by the advice.
Unlike a fixed model pairing, the advisor can be any OpenRouter model, and it can optionally run as a sub-agent with its own tools (for example openrouter:web_search). The tool returns the advisor model’s response directly as the tool result — your model writes the final answer.
The advisor model is resolved with the following precedence:
parameters.model on the tool definition, if set.model argument the executor passes in the tool call, if the
definition does not fix one.This lets you either pin the advisor model up front (parameters.model) or let the executing model pick it per call. The advisor tool itself can never be the advisor model.
The tool’s description steers the model to consult the advisor before substantive work, when it’s stuck, or before declaring a task done — not for trivial steps a single model can resolve directly. To force a consultation on every request, set tool_choice: "required".
Pass an optional parameters object on the tool entry:
When invoking the tool, the model passes:
Instead of a single advisor, you can configure a roster of named profiles in parameters.advisors. Each profile has a required name plus its own optional model, instructions, and the other advisor fields. The executor model still sees one advisor tool and selects a profile by passing its name:
The model then consults a specific profile:
A selected profile’s config takes precedence over the request-wide parameters for that call. Profile names must be unique within the roster — a duplicate name fails the request with a 400. When a roster is configured, the model must pass a name that matches one of the profiles; an unknown or missing name returns an error result listing the valid names.
The single-advisor form (no advisors roster) continues to work unchanged — pass model/instructions directly in parameters and the model calls the tool with just a prompt.
On success the tool result contains the advice text and the model that produced it:
On failure the result has status: "error" with a message; the calling model continues without the advice:
When you pass tools, the advisor runs as an agentic sub-agent over them before producing its advice — for example, giving the advisor openrouter:web_search lets it ground its guidance in fresh sources. The advisor’s tool use happens inside the tool call; only its final text is returned to your model.
The advisor tool cannot invoke itself. Two guards enforce this:
tools array (and rejects the advisor tool name as the advisor model).x-openrouter-advisor-depth header; the advisor tool is stripped from any sub-call, so an advisor sub-agent can never re-enter the advisor.Consultations are also capped per request to bound cost and latency.