Support thinking (enabled / adaptive) for Anthropic-compatible requests on reasoning-capable backends
Summary
The Anthropic-compatible Messages API accepts thinking (type: "enabled" | "adaptive") on requests, but the Anthropic→OpenAI translation never maps it to a backend reasoning parameter. Since #6615 such requests fail with a clear 400 instead of silently dropping the field (#6614) — but the capability itself is still missing. This issue tracks actually supporting thinking for backends/models that can reason.
Motivation
Surface parity.
thinkingis a first-class part of the Anthropic Messages API (extended thinking,budget_tokens, interleaved thinking). OGX exposes the Anthropic wire format and parses the field, but it is dead-on-arrival: accepted on the wire, unsupported in practice.Documented Claude Code integration is a dead end for reasoning models. The integration guide (
claude_code_integration.mdx) advertises "✅ Extended thinking: thinking blocks for reasoning transparency" and lists thinking support as "⚠️ (via reasoning)" for OpenAI-backed models. A user following that guide and pointing Claude Code at a reasoning-capable model hits the 400 from #6615 — the documented capability is not implemented on the Anthropic surface.Reasoning is becoming table stakes. Reasoning models (Qwen3/QwQ-class, R1-class, gpt-oss) are a standard part of the catalog. Anthropic-surface clients can't use them meaningfully without
thinkingpassthrough andthinkingblocks in responses.
Suggested scope (open for discussion)
- Map
thinking.type=enabled(andbudget_tokens) to the backend's reasoning controls (e.g. OpenAIreasoning_effort, provider-native params) for reasoning-capable models; keep the 400 for non-reasoning models. - Decide treatment of
adaptive(map, or document as unsupported). - Translate backend reasoning output into Anthropic
thinkingcontent blocks, including streaming. - Update
claude_code_integration.mdxand the API reference to match what's actually supported.
Source: ogx-ai/ogx