diff --git a/google/genai/_api_client.py b/google/genai/_api_client.py index e6202815e..6d7da7819 100644 --- a/google/genai/_api_client.py +++ b/google/genai/_api_client.py @@ -447,9 +447,7 @@ async def _aiter_response_stream(self) -> AsyncIterator[str]: try: while True: # Read a line from the stream. This returns bytes. - line_bytes = await self.response_stream.content.readline( - max_line_length=READ_BUFFER_SIZE - ) + line_bytes = await self.response_stream.content.readline() if not line_bytes: break # Decode the bytes and remove trailing whitespace and newlines.