OpenRouter ejecuta la herramienta durante la solicitud y devuelve el resultado al modelo, por lo que no se necesita un bucle de herramientas del lado del cliente.
API compatibles: Chat Completions, Responses, and Anthropic Messages.
Anthropic Messages Use the native Anthropic shape, { "type": "advisor_20260301", "name": "advisor", "model": "<advisor model>" }. The model is the only setting it carries, so use openrouter:advisor on Chat Completions or Responses for instructions and the other parameters.
curl https://dynamicsinfo.com/api/v1/chat/completions \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5-mini",
"tools": [
{
"type": "openrouter:advisor",
"parameters": {
"model": "~anthropic/claude-opus-latest"
}
}
],
"messages": [
{
"role": "user",
"content": "Design a rate limiter for a multi-tenant API. Ask your advisor if you get stuck."
}
]
}'