20 views
-/https://github.com/berriai/litellm/issues/23841
GitHub · issue

#23841 bug: multiple issues in anthropic /v1/messages experimental pass-through to openai

  • State: open
  • Author: @garnetlyx
  • Labels: llm translation, claude code

# Bug: Multiple bugs in Anthropic `/v1/messages` experimental pass-through to OpenAI

## Description

There are five related bugs in the Anthropic `/v1/messages` experimental pass-through implementation when routing requests to OpenAI/Azure models. These issues were discovered during integration testing with Claude Code CLI which uses `input_text` content block format and requires forcing routing through Chat Completions API when the downstream proxy doesn't support Responses API.

### Bug 1: `input_text` type not supported in chat completions transformation Claude Code CLI / Claude Agent SDK sends content blocks with `{"type": "input_text"}` (instead of plain `{"type": "text"}`) for user messages and system content. The current implementation only checks for `"text"`, so `input_text` blocks are silently dropped → causes empty input → 422 validation error from downstream provider.

**Location:** `litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py`

### Bug 2: `input_text` type not supported in Responses API transformation Same issue exists on the Responses API conversion path. The code only checks for `"text"` in three locations: - Top-level user content bl…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (18 events)
#0 of 0 · 31d18h47m6s ago — entered · #import:https:::github.com:berriai:litellm post #2084
The left issue spans multiple translation paths and external API compatibility contracts, requiring coordinated code changes and broad regression coverage. The right appears more localized to batching and persistence-loop behavior, with focused validation and database tests.
#23841 is harder because it spans multiple translation paths, content schemas, routing behaviors, and compatibility tests across Anthropic, OpenAI, and Azure integrations. #32456 is narrower, primarily requiring a provider-specific multipart/input-model extension plus focused proxy and regression coverage.
The left is harder because it requires designing and integrating a new centrally managed configuration capability across proxy administration, persistence, policy enforcement, client-specific behavior, and security boundaries. The right is comparatively bounded adapter work with focused transformation fixes and regression coverage.
Issue 23841 is harder because it spans multiple translation paths and compatibility behaviors, requiring careful regression testing across request formats and downstream APIs. Issue 31568 is comparatively bounded provider onboarding with endpoint selection, model metadata, and pricing integration.
34733 demands distributed-state concurrency correctness, atomicity, and reliable asynchronous persistence across replicas, creating substantially higher implementation and regression risk than the mostly localized translation compatibility work in 23841.
Issue 23841 has broader cross-provider adapter scope and multiple conversion paths requiring coordinated fixes and extensive compatibility testing; issue 26897 is a narrower Azure routing/configuration defect with a more localized integration surface.
23841 spans multiple translation paths and compatibility cases, requiring broader behavioral changes and regression coverage; 32201 is a more localized enforcement-path integration fix.
The right issue is harder because it requires coordinated changes across persistence, authentication, distributed spend accounting, reset scheduling, concurrency handling, and backward compatibility. The left issue is comparatively contained within request-transformation adapters and their associated regression tests.
The left issue spans multiple request-conversion paths and compatibility-sensitive translation behavior, requiring coordinated code changes and broad regression testing. The right issue is a more bounded configuration-visibility change across backend and dashboard layers, with masking and precedence considerations but less protocol-surface risk.
31467 requires cross-provider security hardening, trust-boundary analysis, compatibility review, and broad regression coverage; 23841 is comparatively localized adapter and transformation work.
Issue 23841 is harder because it spans several transformation paths and coordinated compatibility fixes, increasing regression and test scope. Issue 30501 is a focused multimodal translation feature, though it still carries provider-specific media handling and validation risk.
The right issue is substantially harder because it requires a new cross-cutting guardrails integration spanning external dependency management, configuration, request/response interception, proxy lifecycle, Python APIs, compatibility, and end-to-end testing. The left issue is comparatively contained adapter debugging across a few translation paths, with focused regression coverage.
Issue 23841 spans several translation paths and provider-specific compatibility cases, requiring coordinated transformation fixes and broad regression coverage. Issue 32562 is narrower, primarily involving failure propagation and terminal-event handling within one streaming iterator flow, so it carries less implementation scope.
The database concurrency issue is harder because it requires safely changing transactional write and locking behavior under contention, with substantial risk to accounting correctness and difficult concurrent testing. The adapter issue spans several conversion paths but is more localized to input normalization and compatibility coverage.
The left requires new protocol-facing proxy behavior, authentication middleware integration, configuration, standards-compliant discovery responses, and security-sensitive testing. The right is broader than a single fix but remains primarily localized request-transformation corrections with targeted regression coverage.
Model omitted braces; inferred difficulty from issue scope and surface area.
Issue 23841 spans multiple translation paths, content formats, provider routing modes, and integration regressions, creating broader implementation and testing risk. Issue 25947 appears more localized to proxy configuration loading and vector-store initialization.
#0 of 0 · 31d17h18m57s ago — current · #import:https:::github.com:berriai:litellm post #3543
34732 requires cross-request coordination and careful atomicity, rollback, and concurrency testing across deployment boundaries; 23841 is broader but mainly localized adapter fixes with targeted regression coverage.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search