BetaServer tools are currently in beta. The API and behavior may change.
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.
You can offer the model a choice of several named advisors by including multiple openrouter:advisor entries in the tools array — one per advisor (see Multiple advisors). At most one entry may omit name to act as the default advisor.
Each advisor also remembers its own prior consultations across requests when you replay the conversation transcript (see Cross-request memory), and the tool is available on the Chat Completions, Responses, and Anthropic Messages APIs (see Anthropic Messages API).
Quick start
Choosing the advisor model
The advisor model is resolved with the following precedence:parameters.modelon the tool definition, if set.- The
modelargument the executor passes in the tool call, if the definition does not fix one. - The model from the outer API request, as a fallback.
parameters.model) or let the executing model pick it per call. The advisor tool itself can never be the advisor model.
When does the model invoke it?
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, settool_choice: "required" (with multiple advisors this forces the first entry — see Multiple advisors).
Parameters
Pass an optionalparameters object on the tool entry:
| Field | Default | Description |
|---|---|---|
name | None (default advisor) | Optional name for this advisor. The model sees one tool per named advisor (plus one default for an entry with no name). Names must be unique across entries. Letters, digits, spaces, underscores, and dashes; trimmed; 1–64 chars. See Multiple advisors. |
model | Outer request model | The advisor model to consult (any OpenRouter model). See Choosing the advisor model. |
tools | None | Tools made available to the advisor sub-agent. Only OpenRouter server tools (such as openrouter:web_search) are supported; function tools are rejected with a 400 because the advisor has no way to execute them. The advisor may not list itself. |
instructions | None | System instructions for the advisor sub-agent. |
forward_transcript | false | When true, the full parent conversation is forwarded to the advisor (and the tool-call prompt, if given, is appended as a final user turn). When false, the advisor sees only the prompt. |
stream | false | When true, the advice streams incrementally as it is produced (Responses API only). See Streaming advice. |
max_tool_calls | Provider default | Max tool-calling steps the advisor sub-agent may take. Only relevant when the advisor has tools. Range 1–25. |
max_completion_tokens | Provider default | Max output tokens (including reasoning) for the advisor call. |
reasoning | Provider default | Reasoning config forwarded to the advisor call — an object with optional effort and max_tokens. |
temperature | Provider default | Sampling temperature (0–2) forwarded to the advisor call. |
Tool-call arguments
When invoking the tool, the model passes:| Argument | Description |
|---|---|
prompt | What the model wants advice on. Required unless forward_transcript is true. |
model | The advisor model to use. Only honored when the tool definition does not fix a model. |
Multiple advisors
To offer the model a choice of advisors, include multipleopenrouter:advisor entries in the tools array — one per advisor. Give each its own name (plus its own model, instructions, and the other advisor fields); the model sees one distinct tool per named advisor and calls whichever fits the task:
- At most one entry may omit
name— it becomes the default advisor. Two or more unnamed advisor entries fail the request with a400: “Only one advisor tool can serve as the default. All other advisor tools must have a name defined.” - Names must be unique across entries (compared after trimming whitespace). A duplicate name fails the request with a
400. - Names allow letters, digits, spaces, underscores, and dashes (e.g.
"Lead Architect"), are trimmed, and must be 1–64 characters.
name off to keep it as the default. Each advisor’s result reports the model it consulted, so you can tell the advisors apart in the response.
tool_choice and named advisorsForcing the advisor with
tool_choice (e.g. tool_choice: "required", or selecting the openrouter:advisor tool) targets the first advisor entry. Forcing a specific named advisor via tool_choice is not yet supported.Cross-request memory
Each advisor remembers its own priorprompt → advice exchanges across API requests in a conversation. When you send a follow-up request that replays the prior transcript — assistant messages with their advisor tool calls and results included, as returned by the API — the advisor sees its earlier consultations replayed into its context before the new prompt. Tell the advisor a fact in one request, and it can recall it in the next without the executor restating it.
This works on all three APIs; the only requirement is that you replay the advisor exchanges you received:
- Chat Completions: include the assistant message’s advisor
tool_callsand the pairedrole: "tool"result messages from prior turns. - Responses API: include the
openrouter:advisoroutput items from prior responses ininput, unchanged. - Anthropic Messages API: include the assistant message’s advisor
server_tool_useandadvisor_tool_resultcontent blocks from prior turns.
forward_transcript: true the advisor already sees the full parent conversation, so prior exchanges are not separately replayed.
Keep advisor entry order stableAdvisor identity is positional — derived from the entry’s index in the request
tools array. Keep the order of advisor entries stable across the requests of a conversation (and echo the instance_name field on replayed Responses items unchanged). Reordering or inserting advisor entries between requests shifts identities, and each advisor reconstructs another’s memory.Streaming advice
By default the advice arrives only once the advisor has finished — as a single tool result. Setparameters.stream to true to have the advice stream out incrementally as the advisor model produces it:
response.output_text.delta events as the advice is generated, followed by a response.output_text.done and the completed item. The completed item still carries the full advice string, so consumers that don’t read the deltas are unaffected. stream can be set per advisor entry, so you can stream some advisors and not others.
The streamed deltas mirror how a normal assistant message streams text — the item_id on each delta is the advisor output item’s id.
Streaming has no effect on the Chat Completions API (the advice arrives only as the final tool result regardless of stream). Streaming the advice in the Anthropic Messages API is a planned fast-follow; today a Messages request behaves as if stream were false.
What the tool returns
On success the tool result contains the advice text and the model that produced it:status: "error" with a message; the calling model continues without the advice:
Anthropic Messages API
On/api/v1/messages, request the advisor with the native Anthropic tool shape — and it works with any executor model, not just Anthropic ones:
server_tool_use block with name: "advisor" for the call, followed by an advisor_tool_result block with the advice:
modelis the only advisor configuration the native shape carries. Forinstructions, sub-agenttools,forward_transcript, and the other parameters, use theopenrouter:advisorform on Chat Completions or Responses.max_usesis not honored: consultations are capped per request by OpenRouter’s fixed limit, and amax_usesbelow that limit does not lower it.caching,allowed_callers, anddefer_loadingare also ignored.- Forcing the advisor via
tool_choice: { "type": "tool", "name": "advisor" }is supported.
Sub-agent tools
When you passtools, 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.
Nested tools must be OpenRouter server tools (for example openrouter:web_search or openrouter:web_fetch). Function tools ({ "type": "function" }) are rejected with a 400: the advisor call has no client-side executor, so a function tool call could never be fulfilled.
Recursion protection
The advisor tool cannot invoke itself. Two guards enforce this:- A self-reference check rejects an advisor entry inside the advisor’s own
toolsarray (and rejects the advisor tool name as the advisormodel). - Each inner advisor call carries an
x-openrouter-advisor-depthheader; the advisor tool is stripped from any sub-call, so an advisor sub-agent can never re-enter the advisor.
Related
- Fusion server tool — multi-model deliberation
- Web Search server tool
- Web Fetch server tool