Conversation
- Add detailed exception logging for sync and async HTTP streaming requests - Include request context such as url, method, stream, timeout, status code, and request id - Handle SSE done events consistently across streaming parsers - Avoid swallowing stream read failures while preserving original exception behavior - Fix pylint warning by avoiding redefinition of built-in id
There was a problem hiding this comment.
Code Review
This pull request introduces several enhancements and bug fixes across the DashScope SDK. Key changes include adding asynchronous support for text reranking via AioTextReRank, implementing wait_timeout_seconds for image and video synthesis blocking calls, adding trust_env configuration for HTTP requests, and improving stream event parsing and error handling in both synchronous and asynchronous HTTP requests. Additionally, connection and timeout handling in QwenTtsRealtime has been robustified, and local file URI path resolution in OSS utilities has been improved. The code reviewer suggests catching asyncio.TimeoutError alongside aiohttp.ClientError in http_request.py for consistency with aiohttp_request.py to ensure timeout exceptions are correctly logged as request failures.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Description
[Describe what this PR does and why]
Related Issue: Fixes #[issue_number] or Relates to #[issue_number]
Security Considerations: [Check if API keys or sensitive credentials are exposed in code/logs]
Type of Change
Component(s) Affected
Checklist
Testing
[How to test these changes]
Additional Notes
[Optional: any other context]