litellm/tests/unit/proxy/client
Mateo Wang 26e53cb738
fix(cli): let the proxy decide when a classic lite login token has expired (#47712)
* test(cli): print-token and whoami let the proxy judge a classic token past the client window

* fix(cli): let the proxy decide when a classic lite login token has expired

* fix(cli): treat 403 and 404 as a rejected token and judge lite up logins the same way

* fix(cli): keep lite up on the client window and bound the proxy check to 3 seconds

* test(cli): prove the proxy check gives up on a silent proxy and pin stale fixtures

Point the timeout test at a local socket that never answers, use fixed
timestamps for stale CLI token fixtures, and correct the print-token docs
for tokens younger than the client window.

* fix(cli): expire a CLI token with no recorded proxy and stop treating 404 as rejected

A token file without base_url cannot be checked, so it keeps the client
window's verdict instead of printing forever. A 404 also comes from a proxy
that does not serve /v1/models, so only 401 and 403 count as a rejected key,
matching the CLI's existing key check. The timeout test now runs in process.

* test(cli): judge the whoami proxy check on a fixed timestamp and name the client window for lite up
2026-10-28 13:07:17 -07:00
..
cli fix(cli): let the proxy decide when a classic lite login token has expired (#47712) 2026-10-28 13:07:17 -07:00
__init__.py
conftest.py
test_chat.py fix(proxy)!: end a chat completions stream with an error event when a guardrail blocks mid-stream (#46953) 2026-10-17 18:00:12 -07:00
test_client.py
test_credentials.py
test_http_client.py
test_http_commands.py
test_keys.py
test_model_groups.py
test_models.py
test_teams.py
test_users.py