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
Fix streaming crash on Bedrock while preserving OpenAI usage stats (#64)
- Remove global default for `stream_options`, which caused crashes on non-OpenAI providers (e.g., Bedrock, Vertex) by routing requests to the wrong endpoint.
- Implement smart logic in `_stream` and `_astream` to automatically add `stream_options={"include_usage": True}` *only* when an OpenAI/Azure model is detected.
- Maintain backward compatibility for OpenAI users who rely on streaming usage stats.
- Allow users to manually override `stream_options` for any provider.
Fixes#51.
0 commit comments