Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage not included with Azure OpenAI in streaming mode #910

Open
lavisht22 opened this issue Jan 31, 2025 · 0 comments
Open

Usage not included with Azure OpenAI in streaming mode #910

lavisht22 opened this issue Jan 31, 2025 · 0 comments
Labels
bug Something isn't working triage

Comments

@lavisht22
Copy link

What Happened?

When in streaming mode and the provider is set to "azure-openai", the last chunk containing the usage is not returned, where as it is returned from the original API.

I tested the original API and via Portkey using same configuration

{
    "model": "gpt-4o",
    "messages": [
        {
            "role": "system",
            "content": "You are a helpful assistant."
        }
    ],
    "stream": true,
    "stream_options": {
        "include_usage": true
    }
}

What Should Have Happened?

The stream should include the last message containing the usage details.

Relevant Code Snippet

No response

Your Twitter/LinkedIn

lthakkar22

@lavisht22 lavisht22 added the bug Something isn't working label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant