GlobalRouter.stream() calls error_from_response() on the response returned by httpx.Client.send(..., stream=True) without first reading the response body. For a real streaming response, error_from_response() reaches response.json()/response.text before read() has been called, causing httpx.ResponseNotRead instead of the documented GlobalRouterError for a 4xx/5xx streaming endpoint. The async path has the same issue and should await result.aread() before normalization.
File: src/globalrouter/_client.py
Line: 214
Severity: medium
Summary: unread stream response in stream
GlobalRouter.stream() calls error_from_response() on the response returned by httpx.Client.send(..., stream=True) without first reading the response body. For a real streaming response, error_from_response() reaches response.json()/response.text before read() has been called, causing httpx.ResponseNotRead instead of the documented GlobalRouterError for a 4xx/5xx streaming endpoint. The async path has the same issue and should await result.aread() before normalization.
File:
src/globalrouter/_client.pyLine: 214
Severity: medium
Summary: unread stream response in stream