litellm/tests
shrey kharbanda cebadae064 feat(mcp): read profile grants from caller permissions
caller_auth_profile_grants returns a caller's MCP auth profile grants in
agent, key and team order, or UnreadableGrants when a permission the
caller links cannot be read. No route calls it yet, and server selection
wires it in later

A grant read asks get_object_permission for the grant column with
require_profile_grants. That read goes to the writer under a cache lease
when the cached row lacks the column. Every permission fill now caches an
empty grant column explicitly, so a warm entry answers the grant read

A managed agent's grants come from its permission row's current state,
because an SSE session keeps the policy it connected with. A team cached
without its permission row reads that row by id, as a key does. An agent
with no row, such as a config.yaml agent, holds no agent grant. A proxy
without a database holds no agent or team grant. Only a failed read
makes grants unreadable. A delegated managed agent holds no grants, and its
key and team grants are ignored

Catalog refresh hands the key row it already reads to the first grant
read. It also notes when the key is now bound to another agent than the
one admitted, which makes the grants unreadable. Refresh reads no agent
policy, so catalog listing is unchanged for every caller

Not breaking, because no route changes status or body
2026-11-27 06:16:39 +00:00
..
_support fix(gemini): return an error instead of an empty 200 when a Gemini image request gets no image (#29125) 2026-11-25 20:55:23 +00:00
audio_tests feat(vertex-ai)!: support gemini 3.1 flash tts (#31915) 2026-10-21 04:18:42 +00:00
base_sdk_tests fix(packaging): ship the license public key in the litellm-proxy sdist (#52970) 2026-11-19 23:18:32 +00:00
basic_proxy_startup_tests feat(docker)!: one shipped image and one entrypoint beside the Dockerfile (#43332) 2026-11-10 18:32:16 -08:00
benchmarks fix(guardrails): classify only the frames each read completes in Presidio's first-frame wait (#54379) 2026-11-25 11:15:49 +00:00
code_coverage_tests fix(anthropic): map /v1/messages fields onto OpenAI Responses equivalents or reject them (#54173) 2026-11-25 19:30:01 +00:00
documentation_tests chore: move workspace packages under litellm (#51000) 2026-11-12 04:19:57 +00:00
e2e refactor(ui): migrate logging callback forms to the form kit (#54562) 2026-11-26 01:28:19 +00:00
e2e_harness test(e2e): move the Claude Code matrix to Opus, Sonnet and Haiku 5.5, Fable 5.2 and GPT-6 (#54305) 2026-11-25 01:47:03 +00:00
fixtures
harness_e2e fix(harness): set PWD to the working directory of local sandbox commands (#47530) 2026-10-20 20:06:11 +00:00
integration fix(proxy): keep a request's slot, TPM and budget holds while it runs MCP tools (#54469) 2026-11-26 08:11:44 +00:00
rust-python-harness fix(gateway): serve messages drop, summary and timeout settings like Python (#51236) 2026-11-25 09:26:12 +00:00
test_litellm_rust fix(anthropic): keep caller tool_use ids unless the upstream rejects them (#54468) 2026-11-26 05:55:01 +00:00
typing chore: move config and docs off the repo root (#50966) 2026-11-11 18:29:35 -08:00
unit feat(mcp): read profile grants from caller permissions 2026-11-27 06:16:39 +00:00
windows_tests ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
__init__.py
_fake_openai_endpoint_server.py
_flush_vcr_cache.py
_live_test_helpers.py
_master_key.py
_module_state.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
_openai_record_replay_proxy.py
_process_helpers.py
_vcr_conftest_common.py ci: remove CircleCI (#50950) 2026-11-11 15:38:27 -08:00
_vcr_redis_persister.py
_wait_helpers.py
_ws_vcr.py
AGENTS.md
capturing_transport.py
eval_swe_bench.py
fake_openai_endpoint.py
gettysburg.wav
large_text.py
openai_batch_completions.jsonl
pyrightconfig.json
README.MD
test_logging.conf
test_rust_python_harness.py
VCR_TESTING.md
white_100x100.png

In total litellm runs 1000+ tests

[02/20/2025] Update:

To make it easier to contribute and map what behavior is tested,

we've started mapping the litellm directory in tests/unit

This folder can only run mock tests.