6 views
-/https://github.com/berriai/litellm/issues/35124
GitHub · issue

#35124 [Bug]: Streamed /v1/messages to an openai/ backend never emits a logging callback (AnthropicStreamWrapper / AnthropicResponsesStreamWrapper never thread litellm_logging_obj)

  • State: open
  • Author: @jimmychen-p72
  • Labels: llm translation

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

Streaming `POST /v1/messages` (Anthropic-format endpoint) routed to an `openai/`-provider backend returns HTTP 200 successfully and streams a correct Anthropic-shape SSE body to the client — but **no logging callback (`StandardLoggingPayload`) is ever emitted** for the request. The request is billed by the provider but recorded with 0 tokens / $0 cost, so it's invisible to any success-logging integration (spend tracking, S3/Datadog callbacks, etc). No exception is raised anywhere — this is a silent gap, not a crash.

This affects **both** of the custom Anthropic-messages streaming adapters:

| Adapter | Backend models | Streaming wrapper | |---|---|---| | `litellm/llms/anthropic/experimental_pass_through/adapters/` | chat-completions-API models (e.g. `gpt-4o-mini`) | `AnthropicStreamWrapper` | | `litellm/llms/anthropic/experimental_pass_through/responses_adapters/` | Responses-API models | `AnthropicResponsesStreamWrapper` |

### Root cause

Both `AnthropicStreamWrapper` and `AnthropicResponsesStreamWrapper` drain the inner provider SSE stream …

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h45m37s ago — entered · #import:https:::github.com:berriai:litellm post #2103
#35124 is harder because it spans two streaming adapter implementations and requires preserving logging state and callback behavior across asynchronous stream lifecycles, with broader regression-testing risk; #30217 is comparatively localized URL-resolution and routing work.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search