litellm/tests/unit/proxy/client/cli
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
..
autoroute
__init__.py
conftest.py
test_agents.py feat(cli): keep the ChatGPT login with lite codex --subscription (#48741) 2026-10-28 05:36:26 -07:00
test_auth_commands.py fix(cli): let the proxy decide when a classic lite login token has expired (#47712) 2026-10-28 13:07:17 -07:00
test_chat_commands.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_claude_settings.py perf(cli): start lite without initializing the litellm SDK (#46803) 2026-10-17 04:53:32 +00:00
test_codex_settings.py
test_config_commands.py feat(cli): keep the ChatGPT login with lite codex --subscription (#48741) 2026-10-28 05:36:26 -07:00
test_configure_commands.py
test_credentials_commands.py perf(cli): start lite without initializing the litellm SDK (#46803) 2026-10-17 04:53:32 +00:00
test_debug_commands.py fix(ui): percent-encode request id in spend log detail URL (#48630) 2026-10-27 13:33:47 -07:00
test_encryption_commands.py refactor(typing): clear 1181 basedpyright Any errors across 431 files (#47789) 2026-10-24 11:31:09 -07:00
test_global_options.py perf(cli): start lite without initializing the litellm SDK (#46803) 2026-10-17 04:53:32 +00:00
test_interface.py fix(cli): run group subcommands in the lite shell and default to the logged-in gateway (#46511) 2026-10-14 18:25:34 -07:00
test_keys_commands.py chore(typing): clear 670 basedpyright Any errors by validating provider payloads at the boundary (#45388) 2026-10-13 15:35:23 -07:00
test_model_groups_commands.py
test_models_commands.py
test_pi.py fix(cli): send pi's session id from lite pi so sessions group and stick (#47700) 2026-10-21 03:24:59 +00:00
test_pkce_login.py
test_statusline_script.py fix(cli): show full-session auto-router cost comparison (#44959) 2026-10-06 16:24:14 -07:00
test_up_commands.py feat(cli): keep the claude.ai login with lite claude --subscription and save pkce in config (#47385) 2026-10-19 15:33:29 -07:00
test_users_commands.py