reason
Performs chain-of-thought reasoning on problems using either internal knowledge or pre-gathered sources, with adjustable depth for thorough analysis.
Instructions
Deep reasoning with chain-of-thought analysis.
Two modes, picked automatically by whether sources is provided:
No-sources mode (default): direct chain-of-thought over the model's own knowledge plus optional
context. Use for problems the model can reason about without external evidence; depth-controlled viareasoning_depth.Sources-aware mode (when
sourcesis non-empty): chain-of-thought synthesis over the pre-gathered sources, with the same shape REST/api/v1/reasonproduces.reasoning_depthis ignored in this mode — the chain-of-thought prompt is fixed because the reasoning shape is what matters here, not the prose register.
For style variants over pre-gathered sources, call synthesize directly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Problem or question requiring reasoning | |
| context | No | Background information or constraints (no-sources mode only) | |
| sources | No | Pre-gathered sources to reason over. If provided, switches to sources-aware mode and uses chain-of-thought synthesis. | |
| reasoning_depth | No | How thorough (no-sources mode only). shallow=2-3 steps, moderate=4-6, deep=7+ | moderate |
| openrouter_api_key | No | Per-request key override; defaults to RESEARCH_LLM_API_KEY. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |