Skip to content

Conversation

@yellowsubmarine372
Copy link
Contributor

Title

fix(aiohttp): set ClientTimeout.total to apply user-configured timeout

Relevant issues

Fixes #16394

Pre-Submission checklist

  • I have added testing in the tests/litellm/ directory
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem
스크린샷 2025-11-08 오후 4 48 01

Type

🐛 Bug Fix
✅ Test

Changes

Sets ClientTimeout.total field in aiohttp_transport.py to match user-configured timeout value.

Why total=read:

  • litellm's async accepts only timeout: Union[float, int], which gets applied equally to all httpx timeout components(read, pool, connect)
  • Using read for total maintains this consistency
  • Matches behavior of other providers (Anthropic, Bedrock, OpenAI)

Testing:
Added 3 tests in test_aiohttp_transport.py:

  • test_handle_async_request_total_timeout_triggers: verifies that a slow streaming response raises httpx.TimeoutException once the user timeout elapses.

@vercel
Copy link

vercel bot commented Nov 8, 2025

@yellowsubmarine372 is attempting to deploy a commit to the CLERKIEAI Team on Vercel.

A member of the Team first needs to authorize it.

@krrishdholakia krrishdholakia merged commit b6dbd4f into BerriAI:main Nov 11, 2025
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants