litellm/tests/unit/proxy/credential_endpoints
Vansh Singh c2c021c8ca
fix(copilot): accept empty or whitespace stored key with key ref (#52014) (#52032)
* fix(copilot): accept empty or whitespace stored key with key ref (#52014)

* fix(copilot): treat blank GitHub App fields as unset and keep other values fail-closed

Booleans and other non-string App field values stay configured so a
non-App request carrying them still fails closed, and a non-string key
ref no longer passes as a blank one

* fix(copilot): never store blank GitHub App fields on a credential

POST /credentials drops a blank or whitespace-only App field instead of
storing it, and PATCH treats one as a deletion. A stored blank key came
back masked as ***** and the dashboard then edited it as an uploaded key

* fix(copilot): keep non-admin credential creates with blank App fields forbidden

* test(copilot): pin that a null App key on update keeps the stored key

* test(copilot): pin that a false or 0 key ref next to an uploaded key fails closed

* fix(copilot): keep signing a whitespace-only key that has no key ref

A named credential with a whitespace-only App key and no key ref answered
400 at the head, which the router never retries. The merge base reached JWT
signing and answered 401, so a model group with a working sibling kept
serving. Whitespace still counts as unset next to a key ref.

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-11-16 22:03:15 -08:00
..
__init__.py
test_endpoints.py fix(copilot): accept empty or whitespace stored key with key ref (#52014) (#52032) 2026-11-16 22:03:15 -08:00
test_user_provider_credentials.py feat(redis): serve the proxy's common Redis call with Rust stores (#50170) 2026-11-06 06:01:11 +00:00