Fix Google GenAI streaming handler to use async generator
- Keep stream_generator as async function (not sync) - Wrap Google's synchronous iterator in async generator - Properly structure if/else for streaming vs non-streaming paths - Fix 'client has been closed' error in streaming responses This fixes the issue where streaming requests through autoselect were failing with 'Cannot send a request, as a client has been closed' error.
Showing
This diff is collapsed.
Please
register
or
sign in
to comment