9 views
-/https://github.com/berriai/litellm/issues/35363
GitHub · issue

#35363 [Bug]: /v1/responses batches reconcile to 0 tokens and $0.00 spend, silently

  • State: open
  • Author: @sudhanshugupta-p72
  • Labels: bug, proxy, llm translation

### Check for existing issues

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

### What happened?

A completed managed batch created with `endpoint="/v1/responses"` reconciles to **0 prompt tokens, 0 completion tokens, and $0.00 spend** — even though the batch's output file reports real usage. There is no error and no warning.

The consequence is that batch spend for Responses workloads is invisible: it does not reach `LiteLLM_SpendLogs` with a real value, so per-key and per-team `max_budget` is not enforced for them, and the spend does not appear on any dashboard.

For a 3-line batch whose output file reported 33 input / 57 output tokens:

``` call_type | model | prompt_tokens | completion_tokens | spend aretrieve_batch | openai/gpt-5.2 | 0 | 0 | 0 ```

The same batch content submitted as `/v1/chat/completions` records its usage correctly, which is what pointed us at the Responses path specifically.

A Responses API output line reports usage as `input_tokens` / `output_tokens`, whereas a chat line reports `prompt_tokens` / `completion_tokens`. Constructing the usage object from the Responses-shaped…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d17h51m54s ago — entered · #import:https:::github.com:berriai:litellm post #3005
The left issue is harder because it crosses batch result parsing, provider-specific usage normalization, spend persistence, budget enforcement, and reconciliation tests. The right issue is comparatively localized to telemetry attribute serialization and validation, with limited behavioral impact outside observability.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search