Skip to content

Commit 9ed0f01

Browse files
docs(agents): document reasoningOptions effort + examples; note OpenRouter-style reasoning tokens
Explain Reasoning Options in Agent Reference and show usage in Customizing Agents, aligned with OpenRouter’s “max tokens for reasoning.” Mirrors base-lite usage. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
1 parent 257c995 commit 9ed0f01

File tree

3 files changed

+50
-1
lines changed

3 files changed

+50
-1
lines changed

bun.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/src/content/agents/agent-reference.mdx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,36 @@ The model to use, which can be any model string from [Openrouter](https://openro
6666
"model": "anthropic/claude-4-sonnet-20250522"
6767
```
6868

69+
#### Reasoning Options (`reasoningOptions`, object, optional)
70+
71+
Controls model reasoning behavior using OpenRouter-style settings.
72+
73+
Fields:
74+
75+
- `enabled` (boolean, default: false) — Turn reasoning mode on for supported models.
76+
- `exclude` (boolean, default: false) — If true, omit model-revealed reasoning content from responses (when available), returning only the final answer.
77+
- `effort` ("low" | "medium" | "high") — Increase or decrease how much the model "thinks" before answering. Higher effort typically improves quality for hard tasks at the cost of more reasoning tokens.
78+
79+
Notes:
80+
81+
- Patterned after OpenRouter's "max tokens for reasoning." Higher effort maps to a higher internal reasoning token budget. See OpenRouter docs for background.
82+
- Only supported by models that expose reasoning features. When unsupported, these options are ignored.
83+
84+
Example:
85+
86+
```ts
87+
// .agents/thinker.ts
88+
const definition = {
89+
id: 'thinker',
90+
// ... other fields ...
91+
reasoningOptions: {
92+
enabled: true,
93+
exclude: false,
94+
effort: 'high',
95+
},
96+
}
97+
```
98+
6999
### Behavior Configuration
70100

71101
#### `outputMode` (string, optional, default: "last_message")

web/src/content/agents/customizing-agents.mdx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,25 @@ Keep in mind you'll get the most value from agents if you treat them as context
2525

2626
**Tip:** Use specialty reviewers as spawnable subagents that your context-manager agent calls at the right time in the workflow.
2727

28+
### Reasoning Options (optional)
29+
30+
For models that support it, you can enable and tune reasoning directly on your agent:
31+
32+
```ts
33+
const definition = {
34+
id: 'reviewer',
35+
// ... other fields ...
36+
reasoningOptions: {
37+
enabled: true, // turn on reasoning if supported
38+
exclude: false, // include reasoning traces when available
39+
effort: 'medium', // low | medium | high
40+
},
41+
}
42+
```
43+
44+
- Effort roughly corresponds to a larger internal "max tokens for reasoning."
45+
- If the selected model doesn't support reasoning, these options are safely ignored.
46+
2847
## Example: Security Coordinator Agent
2948

3049
Create a specialized agent for security-focused workflows:

0 commit comments

Comments
 (0)