litellm/tests/litellm
ryan-crabbe-berri 78addb230b
fix(proxy): deny agent access when key and team grants resolve to nothing (#36221)
* fix(proxy): deny when agent grants resolve to nothing

`get_allowed_agents` returned a plain list where the empty value meant both
"this caller was never restricted" and "this caller's grants resolved to
nothing". Downstream read either as allow-all, so a key restricted to one
agent inside a team restricted to another reached every agent on the proxy,
and an access group that resolved to no agents did the same.

Replace it with `resolve_agent_access`, returning a tagged
UnrestrictedAgentAccess | RestrictedAgentAccess. Only a caller with no grant
anywhere is unrestricted; an empty restricted set denies. Access group lookup
failures now propagate to the key/team resolvers so a DB error still fails
open exactly as before, while a group that genuinely resolves to nothing
denies.

* style(proxy): drop redundant comments from the agent access match
2026-08-07 20:44:11 +00:00
..
a2a_protocol/providers/pydantic_ai_agents fix(a2a): forward agent_extra_headers through completion bridge (#28277) 2026-06-11 21:56:18 -07:00
integrations/helicone style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
litellm_core_utils test: create fresh ModelResponse per test to avoid shared mutable state 2026-03-03 14:54:11 -03:00
llms fix(anthropic): coerce explicit additionalProperties to false in output_format schema 2026-08-04 16:21:47 -04:00
proxy fix(proxy): deny agent access when key and team grants resolve to nothing (#36221) 2026-08-07 20:44:11 +00:00
test_bedrock_extended_beta_models.py feat(bedrock): add support for 4 new beta models (#20974) 2026-02-13 18:32:12 +05:30
test_bedrock_nemotron_super.py Litellm ishaan april2 (#25113) 2026-04-04 12:31:49 -07:00
test_no_hardcoded_secrets.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_proxy_auth.py feat(sdk): add proxy_auth for auto OAuth2/JWT token management (#20238) 2026-02-02 22:04:08 -08:00
test_router_retry_backoff_headers.py fix(router): use current retry exception for retry backoff (#20725) 2026-02-10 22:44:25 -08:00
test_sambanova_model_metadata.py Add new chat model metadata (#27313) 2026-05-06 15:15:21 -07:00
test_stream_chunk_builder_images.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00