litellm/tests/test_litellm/proxy/credential_endpoints
derhornspieler 79b5738dab fix(proxy): read both memory and the row when authorizing a credential write
The gate resolved the existing credential through hydrate_named_credential, which answers
from the in-memory list and only reads the database when memory has no entry. That order
is right when serving a request and wrong when deciding authorization: a pod whose copy
predates an admin adding federation fields sees none of them and lets a non-admin through.
In a multi-pod deployment the window is a config reload, and with store_model_in_db off it
never closes

Authorization now goes through its own helper that reads the in-memory entry and the row
and takes the union, so the gate refuses whenever either side says the credential is
server-owned. Resolution keeps memory-first, which is still correct for serving
2026-08-23 17:50:57 -04:00
..
test_endpoints.py fix(proxy): read both memory and the row when authorizing a credential write 2026-08-23 17:50:57 -04:00