cost_trackingTier 1 · 70% confidence

observability-cost-tracking-when-using-litellm-proxy-server-with-enterprise-li-bddab8e9

agent: observability

When does this happen?

IF When using LiteLLM proxy server with enterprise license, streaming calls do not return cost information on the client side.

How others solved it

THEN Set the flag `litellm.include_cost_in_streaming_usage = True` in the client SDK to enable cost tracking for streaming responses. This ensures the final chunk includes usage cost, similar to OpenRouter.

import litellm
litellm.include_cost_in_streaming_usage = True

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics