Files
openrouter-python-sdk-retry…/docs/components/subagentservertoolconfig.mdx
T

18 lines
12 KiB
Plaintext

---
title: "SubagentServerToolConfig"
---
Configuration for the openrouter:subagent server tool.
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `instructions` | *Optional[str]* | :heavy_minus_sign: | System instructions for the subagent. When omitted, the subagent responds with no system prompt of its own. | You are a fast, focused worker. Complete the task exactly as described. |
| `max_completion_tokens` | *Optional[int]* | :heavy_minus_sign: | Maximum number of output tokens (including reasoning) the subagent may produce. When omitted, the provider's default applies. | 2048 |
| `max_tool_calls` | *Optional[int]* | :heavy_minus_sign: | Maximum number of tool-calling steps the subagent may take during its agentic loop. Capped at 25. Only relevant when the subagent is given tools. Accepted and validated but not yet enforced on the subagent call. | 5 |
| `model` | *Optional[str]* | :heavy_minus_sign: | Slug of the model that executes delegated tasks (any OpenRouter model). Typically a smaller, cheaper, faster model than the one delegating. When omitted, the model from the outer API request is used. The subagent tool itself cannot be the subagent model. | ~anthropic/claude-haiku-latest |
| `reasoning` | [Optional[components.SubagentReasoning]](../components/subagentreasoning.mdx) | :heavy_minus_sign: | Reasoning configuration forwarded to the subagent call. Use this to control reasoning effort and token budget for models that support extended thinking. | \{<br/>"effort": "low"<br/>} |
| `temperature` | *Optional[float]* | :heavy_minus_sign: | Sampling temperature forwarded to the subagent call. When omitted, the provider's default applies. | 0.7 |
| `tools` | List[[components.SubagentNestedTool](../components/subagentnestedtool.mdx)] | :heavy_minus_sign: | Tools the subagent may use while executing a delegated task. The subagent runs as an agentic sub-agent over these tools, then returns its outcome. Only OpenRouter server tools are supported — function tools are rejected — and the list must not include the subagent tool itself. | |