litellm/tests/test_litellm/proxy/client
moe-berri b54a1a3698 fix(auto_router): await the provider call and bound uploads against bad limits
route_request resolves the deployment and hands back the provider
coroutine unawaited, so awaiting it once yielded a coroutine, not a
response. Every /v1/bulk_read and /v1/code_write call 502'd with
"worker model returned no completion". Caught by running the generated
command against a live proxy; the unit test missed it because the fake
route_request returned a ModelResponse directly instead of a coroutine.
Fix the second await and the fake, so the test now fails without it.

_read_upload_text checked the incoming remaining_total_bytes but used
min(_MAX_UPLOAD_BYTES_PER_FILE, ...) for the read size, so a zero or
negative LITELLM_SHUNT_MAX_UPLOAD_BYTES_PER_FILE made the read size
negative while the budget was still positive. UploadFile.read treats
that as "read the whole file", turning the bound into no bound. Check
the computed limit instead, which covers both inputs, and read the
three limits with get_env_int_in_range so an out-of-range override
warns and falls back rather than silently disabling the cap.

Restore test_settings.py to its committed state. Rewriting it dropped
the ENABLE_TOOL_SEARCH assertions, the no-mutation regression, and the
comment explaining why every model tier needs its own env override.
None of that was related to this PR.
2026-09-07 17:53:27 -07:00
..
cli fix(auto_router): await the provider call and bound uploads against bad limits 2026-09-07 17:53:27 -07:00
conftest.py fix(proxy): give every requests call a timeout so a silent server cannot hang the caller 2026-08-25 10:12:33 -07:00
test_chat.py fix(proxy): give the remaining CLI clients a request timeout 2026-08-29 13:32:39 -07:00
test_client.py fix(proxy): give the remaining CLI clients a request timeout 2026-08-29 13:32:39 -07:00
test_credentials.py fix(proxy): give the remaining CLI clients a request timeout 2026-08-29 13:32:39 -07:00
test_http_client.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_http_commands.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_keys.py fix(proxy): give the remaining CLI clients a request timeout 2026-08-29 13:32:39 -07:00
test_model_groups.py fix(proxy): give the remaining CLI clients a request timeout 2026-08-29 13:32:39 -07:00
test_models.py fix(proxy): give the remaining CLI clients a request timeout 2026-08-29 13:32:39 -07:00
test_teams.py fix(proxy): give every requests call a timeout so a silent server cannot hang the caller 2026-08-25 10:12:33 -07:00
test_users.py fix(proxy): give every requests call a timeout so a silent server cannot hang the caller 2026-08-25 10:12:33 -07:00