mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-05 07:37:50 +00:00
When a command in the keys, models, model-groups, users, teams, or credentials groups gets a 401 and no key was passed with --api-key or LITELLM_PROXY_API_KEY, lite now runs the PKCE browser sign-in, stores the credential, and runs the command again once with the new key. All sign-in output goes to stderr, so stdout keeps only the command's output. Before it opens a browser, lite checks whether the proxy accepts the rejected key on /v1/models (a 401 can be a role refusal for a valid key), tries a newer key another lite process stored, and refuses to replace a stored login that belongs to a different proxy. An explicit key that gets a 401 fails with a clean error and never opens a browser. |
||
|---|---|---|
| .. | ||
| cli | ||
| __init__.py | ||
| conftest.py | ||
| test_chat.py | ||
| 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 | ||