You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Token usage information is empty when streaming from completions api of litellm proxy server. Observed on openai/openai-compatible endpoints.
As the screenshot below shows, only the streaming+completions api combination has this issue, while streaming+chat completions work correctly.
Using litellm proxy server v1.60.6
Relevant log output
Are you a ML Ops Team?
No
What LiteLLM version are you on ?
v1.60.6
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered:
Possible source of bug: the stream_options arg is missing when instantiating TextCompletionStreamWrapper class below.
Adding stream_options=kwargs.get('stream_options'), seems to fix it for my use case.
krrishdholakia
changed the title
[Bug]: zero usage returned for streaming from completions api of litellm proxy server
[Bug]: zero usage returned for streaming from text completions api of litellm proxy server
Feb 8, 2025
What happened?
Token usage information is empty when streaming from completions api of litellm proxy server. Observed on openai/openai-compatible endpoints.
As the screenshot below shows, only the streaming+completions api combination has this issue, while streaming+chat completions work correctly.
Using litellm proxy server v1.60.6
Relevant log output
Are you a ML Ops Team?
No
What LiteLLM version are you on ?
v1.60.6
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered: