#6658·ogx

Support thinking (enabled / adaptive) for Anthropic-compatible requests on reasoning-capable backends

Author: mattfCreated Sep 25, 2026Updated Sep 25, 2026

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

  1. Surface parity. thinking is 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.

  2. 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.

  3. 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 thinking passthrough and thinking blocks in responses.

Suggested scope (open for discussion)

  • Map thinking.type=enabled (and budget_tokens) to the backend's reasoning controls (e.g. OpenAI reasoning_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 thinking content blocks, including streaming.
  • Update claude_code_integration.mdx and the API reference to match what's actually supported.