Skip to content

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

ProviderAPIpi-goNotes
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 Chatreasoning_effort on GPT-5.2 / o-seriesgated by compat.SupportsReasoningEffort (openai.go:308-310)
OpenAI Responsesreasoning.effort (none/low/med/high/xhigh) + auto summary(convert.go:290-301, openairesponses.go:318-326)
Google GeminithinkingConfig.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 CLImodel_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.

ProviderAPIpi-goNotes
Anthropic✅ thinking signaturesround-tripped via Signature (convert.go:307)
OpenAI Chatreasoning kept server-side via stored conversation only
OpenAI Responsesreasoning.encrypted_content; ZDR-compatibleResponseIncludableReasoningEncryptedContent (openairesponses.go:323-325)
Google GeminithoughtSignature (Gemini 3+)preserved on Thinking and ToolCall blocks (google.go:187, 228-229)

Provider Documentation

pi-go Gaps

  • Thinking display (summarized / omitted) — not exposed; the provider leaves the API default.
  • Google HTTP provider asymmetrypkg/ai/provider/google does not set thinkingConfig; 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.