litellm/tests/test_litellm/proxy/client/cli
mateo-berri 3c73a39877 fix(cli): verify every credential store transition before reporting it done
A keyring backend can accept a write and keep nothing. That is exactly what
`keyring --disable` and PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
select, and it raises nothing to distinguish itself, so `lite login` was
handing the credential to a black hole, scrubbing its own copy from
token.json, and printing a success message over a login that no longer
worked. Reading the value back is the only way to tell that backend apart
from a keychain that really stored the secret.

The same rule closes the rest of the gaps. A credential the token file will
not record is taken back out of the keychain instead of being left live on a
machine with no record of it, and is reported rather than raised. The
migration stages its scrubbed file before the keychain is handed anything,
so a directory that will not accept the rewrite stops the move rather than
leaving the secret in two places. Logout no longer reads a key in the file
as proof that the keychain is clear, which was never sound across two
separate runs, and only draws that conclusion when the `keyring` package is
missing outright, where nothing could have reached a keychain at all.
2026-08-19 21:10:59 -07:00
..
autoroute fix(autoroute): discover models via /v1/models so an AI-API-only key works (#34259) 2026-07-22 20:50:14 -07:00
__init__.py Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
test_agents.py feat(cli): store the lite login credential in the OS keychain 2026-08-19 18:57:35 -07:00
test_auth_commands.py fix(cli): verify every credential store transition before reporting it done 2026-08-19 21:10:59 -07:00
test_claude_settings.py feat(cli): store the lite login credential in the OS keychain 2026-08-19 18:57:35 -07:00
test_config_commands.py feat(cli): store the lite login credential in the OS keychain 2026-08-19 18:57:35 -07:00
test_credentials_commands.py test fix creds test 2025-07-03 22:01:52 -07:00
test_encryption_commands.py feat(proxy): add AES-256-GCM at-rest credential encryption with versioned format and re-encryption migration (#31215) 2026-06-29 20:14:22 +02:00
test_global_options.py test(cli): use example.com placeholder host in base-url trailing slash test (#37240) 2026-08-18 00:52:10 +00:00
test_keys_commands.py fix(cli): make CLI output ASCII-only so it doesn't crash legacy Windows consoles (#33465) 2026-07-16 10:35:06 -07:00
test_model_groups_commands.py feat(cli): add lite up/down to ambiently route Claude Code through the proxy (#33231) 2026-07-15 21:46:02 -07:00
test_models_commands.py sys.path.insert for cli tests 2025-07-03 15:58:49 -07:00
test_up_commands.py feat(cli): store the lite login credential in the OS keychain 2026-08-19 18:57:35 -07:00
test_users_commands.py sys.path.insert for cli tests 2025-07-03 15:58:49 -07:00