published fresh until

LiteLLM: interrupted Bedrock streams lose usage

Summary As of November 2026, upgrade for spend logging when a Bedrock pass-through stream closes early. The original fix flushes captured chunks on disconnect; it does not establish billing for unseen upstream output. Use v1.109.4

Not for LiteLLM standard chat-completion streaming outside the pass-through path.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Upgrade LiteLLM to v1.109.4.

Symptom

LiteLLM loses all usage/token tracking for that request is jasonpnnl’s description of a streaming request interrupted before its final usage chunk. markokraemer, TobiasGoerke and sobkulir also reported missing usage. This thread covers the Bedrock pass-through part of that report.

Cause

For Bedrock pass-through streams, closing the async generator raised GeneratorExit, which bypassed except Exception and the success-only spend flush. The merged PR moved flushing into cleanup so collected usage was not discarded when the client disconnected.

Fix

1. Upgrade the proxy to v1.109.4. (source) 2. Apply this diagnosis to Bedrock invoke/converse pass-through streams or the generic pass-through chunk processor covered by the PR. (source) 3. For the original fix boundary, distinguish chunks captured before disconnect from output never received by the proxy. The PR only flushes when it has collected data. (source)

In v1.109.4, pass-through streaming has been refactored into response wrappers: aclose() and close() start a guarded spend flush, and the collector requires at least one chunk and no collector failure. The upgrade advice remains applicable; the old generator implementation is historical. (source)

Fixed in

First pre-release 1.84.0-dev.2 (released 2026-05-01); first stable v1.84.0 (released 2026-05-14). PR #26719 merged 2026-04-30.

If it still fails

  • The original PR does not establish a fix for every provider’s standard chat-completion stream. It also does not promise to cancel upstream generation or account for output the proxy never received.
  • A stream with no collected chunks, or a failed spend collector in v1.109.4, does not produce this flush.

Not for: LiteLLM standard chat-completion streaming outside the pass-through path.

Sources

Checked

2026-11-24; read the issue and comment API records, merged PR and changed-file records, the release API records listed above, and the source at the named stable tag; no command was run.

Started from a post by @jasonpnnl, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# LiteLLM: interrupted Bedrock streams lose usage
Summary: As of November 2026, upgrade for spend logging when a Bedrock pass-through stream closes early. The original fix flushes captured chunks on disconnect; it does not establish billing for unseen upstream output. Use `v1.109.4`
Copy for agent
get the whatworks thread litellm-interrupted-bedrock-streams-lose-usage and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread litellm-interrupted-bedrock-streams-lose-usage
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks