mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-12 08:42:18 +00:00
* feat(proxy): let a key's logging entry reference a proxy credential
A virtual key's metadata.logging entry can name a proxy credential with
litellm_credential_name. At request time the credential's values, which config
credential_list resolves through the secret manager at boot, are merged under the
entry's callback_vars, with the entry's own values winning. An entry whose
credential is not defined is dropped, so it never falls back to the proxy's own
callback environment.
Only proxy admins may change the logging entries of a key when the stored or
requested list holds a reference (403), and a reference to an undefined
credential is a 400. The check runs on key generate, update, team bulk update,
regenerate and /user/new, and compares decrypted entries so re-saving metadata
read back from /key/info is not a change.
Resolves LIT-10061
* fix(proxy): drop a key logging entry whose referenced credential holds no logging values
* fix(proxy): only require newly added credential references to exist on key writes
* fix(proxy): log a dropped credential reference as an error so /key/health reports it
* fix(proxy): gate credential references on bulk-created user keys
* fix(proxy): keep failing requests on keys with non-object logging metadata
A key whose stored metadata.logging is not a list of objects failed every
request with a 500 before this branch. The credential reference rewrite
turned those values into no entries, so the request quietly succeeded
without the key's logging. Raise a TypeError for those shapes again so the
request path behaves as it did on main, while empty values and objects with
unknown fields still go through the existing skip.
* test(proxy): audit cells for credential references across surfaces, v1, dropped entries and malformed logging
The malformed logging cell expects the base behavior that
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| team_metadata_validator_impls.py | ||
| test_access_group_key_sync.py | ||
| test_access_group_model_sync.py | ||
| test_access_group_team_sync.py | ||
| test_audit_log_callbacks.py | ||
| test_audit_logs_proxy.py | ||
| test_auto_router_availability.py | ||
| test_auto_router_permissions.py | ||
| test_bulk_user_creation.py | ||
| test_bulk_user_deletion.py | ||
| test_management_helpers_utils.py | ||
| test_object_permission_utils.py | ||
| test_resource_display_names.py | ||
| test_team_list_sorting.py | ||
| test_team_member_permission_checks.py | ||
| test_team_metadata_validation.py | ||
| test_team_roster_sync.py | ||
| test_user_list_sorting.py | ||