Capabilities
Reasoning
Extended / adaptive thinking, reasoning effort budgets, encrypted reasoning passthrough
Read this when
- Configuring reasoning depth for a feature
- Maintaining multi-turn reasoning continuity
StreamOptions.ThinkingLevel maps a normalized level (minimal, low, medium, high, xhigh) to each provider’s reasoning configuration. Thinking blocks emerge as ai.Thinking content with an optional Signature for cross-turn passthrough.
Extended / Adaptive Thinking
| Provider | API | pi-go | Notes |
|---|---|---|---|
| Anthropic | ✅ Adaptive Thinking — effort low/med/high/xhigh/max; legacy token budget removed on 4.7+ | ✅ | pi-go sends adaptive thinking with output_config.effort mapped from the thinking level; pre-4.6 models get the token-budget form |
| OpenAI Chat | ✅ reasoning_effort on GPT-5.2 / o-series | ✅ | gated by compat.SupportsReasoningEffort (openai.go:308-310) |
| OpenAI Responses | ✅ reasoning.effort (none/low/med/high/xhigh) + auto summary | ✅ | (convert.go:290-301, openairesponses.go:318-326) |
| Google Gemini | ✅ thinkingConfig.thinkingBudget (Gemini 2.5+); thinking_level (Gemini 3+) | ⚠️ | the google provider does not set thinkingConfig |
| Claude CLI | ✅ --effort (low/medium/high/xhigh/max, model-dependent) | ✅ | level → --effort; minimal floors to low, off/unknown omit the flag (claudecli claude.go:99, agent/claude config.go:71) |
| Codex CLI | ✅ model_reasoning_effort (minimal/low/medium/high/xhigh) | ✅ | level → -c model_reasoning_effort; off/unknown omit the override (codexcli codex.go:112, agent/codex config.go:84) |
| Cursor CLI | ❌ no reasoning-effort flag; reasoning bound to the model name (*-thinking) | — | ThinkingLevel ignored; pass a thinking-capable model instead (cursorcli cursor.go:129) |
Encrypted Reasoning Passthrough
Providers return reasoning blocks with a signed/encrypted blob. Clients echo the blob back on subsequent turns; the model decrypts it server-side and continues its prior thinking.
| Provider | API | pi-go | Notes |
|---|---|---|---|
| Anthropic | ✅ thinking signatures | ✅ | round-tripped via Signature (convert.go:307) |
| OpenAI Chat | ❌ | — | reasoning kept server-side via stored conversation only |
| OpenAI Responses | ✅ reasoning.encrypted_content; ZDR-compatible | ✅ | ResponseIncludableReasoningEncryptedContent (openairesponses.go:323-325) |
| Google Gemini | ✅ thoughtSignature (Gemini 3+) | ✅ | preserved on Thinking and ToolCall blocks (google.go:187, 228-229) |
Provider Documentation
- Anthropic — Extended / Adaptive thinking
- OpenAI — Reasoning models
- OpenAI — Encrypted reasoning content
- OpenAI — Reasoning best practices
- Google Gemini — Thinking
- Google — Thought signatures
pi-go Gaps
- Thinking display (
summarized/omitted) — not exposed; the provider leaves the API default. - Google HTTP provider asymmetry —
pkg/ai/provider/googledoes not setthinkingConfig; thinking is uncontrolled there. - Reasoning summaries are wired only for OpenAI Responses; Anthropic and Gemini do not surface summaries.
- Tools-in-reasoning chain (OpenAI o3/o4-mini calling tools mid-CoT) — no special handling.
- Disabling thinking (level
none/ zero budget) is not consistently expressible across providers. - Encrypted reasoning passthrough is the strongest area of provider parity — no major gaps there. Verify callers correctly include thinking blocks before tool-result turns or risk losing reasoning state.