#32188 [Bug]: `use_chat_completions_url_for_anthropic_messages` forwards non-spec `thinking_blocks` field to chat/completions upstreams — 400 on strict providers, breaks Claude Code multi-turn
## What Happened
We route Claude Code (Anthropic `/v1/messages` client) through the LiteLLM proxy to Azure-hosted OpenAI-compatible models. To avoid the Responses-API bridge we enabled the documented opt-out:
``` LITELLM_USE_CHAT_COMPLETIONS_URL_FOR_ANTHROPIC_MESSAGES=true ```
Single-turn requests work. **Any multi-turn request whose assistant history contains `thinking` blocks (which Anthropic-native clients like Claude Code always echo back) fails with HTTP 400 from the upstream:**
``` litellm.BadRequestError: OpenAIException - Extra inputs are not permitted, field: 'messages[2].thinking_blocks', value: [{'type': 'thinking', 'thinking': '…', 'signature': '', 'cache_control': {}}] ```
The anthropic→chat transform attaches the echoed thinking blocks as a **`thinking_blocks` field on the outbound chat-completions assistant message**. `thinking_blocks` is not part of the OpenAI chat-completions schema; providers with strict request validation (our Azure-hosted deployment rejects unknown fields) return 400. Lenient providers silently accept a non-spec field.
This makes the flag unusable for its most natural purpose — pointing Anthropic-format coding agents (Claude Code) at chat/…