litellm/tests/unit/proxy/mcp_server
yujonglee 6245f94734
Some checks failed
smoke / all-extras-py (push) Blocked by required conditions
unit / key-generation (push) Blocked by required conditions
unit / lint-runtime (push) Blocked by required conditions
smoke / smoke-rust-bridge (push) Waiting to run
smoke / dashboard-build (push) Waiting to run
smoke / py (push) Blocked by required conditions
unit / logging-misc (push) Blocked by required conditions
smoke / windows-sdk (push) Waiting to run
smoke / proxy-build-from-pip (push) Waiting to run
unit / mcp-oauth (push) Blocked by required conditions
smoke / smoke passed (push) Blocked by required conditions
LiteLLM Rust DB / db-queries (push) Waiting to run
unit / llms-vertex-ai (push) Blocked by required conditions
CodSpeed Benchmarks / benchmarks (push) Waiting to run
unit / mcp-elicitation (push) Blocked by required conditions
Cost map pins recheck / rerun-cost-map-guard (push) Waiting to run
unit / mcp-server (push) Blocked by required conditions
Publish lint base counts / publish (basedpyright, litellm/scripts/type_check_gate.py) (push) Waiting to run
unit / proxy-auth (push) Blocked by required conditions
unit / proxy-runtime (push) Blocked by required conditions
unit / caching-local (push) Blocked by required conditions
unit / enterprise-repositories-secrets (push) Blocked by required conditions
Publish lint base counts / publish (openapi-docs, litellm/scripts/openapi_docs_gate.py) (push) Waiting to run
unit / proxy-extras (push) Blocked by required conditions
Publish lint base counts / publish (ruff-strict, litellm/scripts/ruff_strict_gate.py) (push) Waiting to run
unit / proxy-hooks-client (push) Blocked by required conditions
Publish lint base counts / publish (test-quality, litellm/scripts/test_quality_gate.py) (push) Waiting to run
unit / proxy-infra-db-spend (push) Blocked by required conditions
Publish lint base counts / publish (type-discipline, litellm/scripts/type_discipline_gate.py) (push) Waiting to run
unit / proxy-infra-root-a-p (push) Blocked by required conditions
unit / proxy-server-core (push) Blocked by required conditions
unit / core-utils (push) Blocked by required conditions
unit / proxy-server (push) Blocked by required conditions
unit / OpenAI 2.20.0 compatibility (push) Blocked by required conditions
unit / redis-py 6.4.0 compatibility (push) Blocked by required conditions
unit / redis-py 8.0.1 compatibility (push) Blocked by required conditions
Root entry limit / root-entry-limit (push) Waiting to run
unit / proxy-infra-root-q-z (push) Blocked by required conditions
unit / root (push) Blocked by required conditions
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
unit / proxy-infra-routing (push) Blocked by required conditions
unit / custom-logging (push) Blocked by required conditions
unit / proxy-utils (push) Blocked by required conditions
unit / endpoints (push) Blocked by required conditions
unit / lens-python-310 (push) Blocked by required conditions
unit / OpenAI 3.0.0 compatibility (push) Blocked by required conditions
unit / redis-py 7.4.1 compatibility (push) Blocked by required conditions
GitHub Actions Security Analysis / zizmor (push) Waiting to run
lint / lint plan (push) Waiting to run
unit / proxy-subprocess (push) Blocked by required conditions
unit / router (push) Blocked by required conditions
unit / core-auth-request (push) Blocked by required conditions
unit / enterprise-package (push) Blocked by required conditions
unit / ui-unit (push) Waiting to run
unit / OpenAI 3.25.0 compatibility (push) Blocked by required conditions
unit / unit passed (push) Blocked by required conditions
lint / python (push) Blocked by required conditions
lint / typecheck (push) Blocked by required conditions
unit / responses-caching-types (push) Blocked by required conditions
unit / db-and-spend (push) Blocked by required conditions
unit / core-auth-spend (push) Blocked by required conditions
unit / integrations (push) Blocked by required conditions
lint / e2e-harness (push) Blocked by required conditions
unit / rust-bridge-harness (push) Blocked by required conditions
unit / core-logging-request-path (push) Blocked by required conditions
unit / llms-anthropic (push) Blocked by required conditions
lint / secret-scan (push) Waiting to run
unit / llms-providers (push) Blocked by required conditions
unit / endpoints-and-responses (push) Blocked by required conditions
unit / core-management-cost (push) Blocked by required conditions
unit / llms-bedrock (push) Blocked by required conditions
lint / ui (push) Blocked by required conditions
unit / proxy-endpoints (push) Blocked by required conditions
lint / ui-api-types (push) Blocked by required conditions
unit / proxy-feature-endpoints (push) Blocked by required conditions
unit / core-utils-route (push) Blocked by required conditions
unit / llms-openai-meta (push) Blocked by required conditions
unit / docs (push) Blocked by required conditions
unit / redis-py 5.3.1 compatibility (push) Blocked by required conditions
unit / rust-bridge (push) Waiting to run
unit / plan (push) Waiting to run
lint / code-quality (push) Blocked by required conditions
unit / auth-checks (push) Blocked by required conditions
unit / enterprise-routing (push) Blocked by required conditions
lint / ci-coverage (push) Blocked by required conditions
unit / budgets (push) Blocked by required conditions
unit / core-router (push) Blocked by required conditions
unit / changed-tests (push) Blocked by required conditions
lint / semgrep (push) Blocked by required conditions
unit / guardrails-hooks (push) Blocked by required conditions
unit / core-router-core (push) Blocked by required conditions
unit / enterprise-managed-files (push) Blocked by required conditions
unit / helm (push) Blocked by required conditions
lint / lint passed (push) Blocked by required conditions
unit / jwt-and-keys (push) Blocked by required conditions
unit / core-router-retries (push) Blocked by required conditions
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled
refactor(auth_cache_invalidation): move the invalidation channel to the native client (#51135)
* refactor(auth_cache_invalidation): move the invalidation channel to the native client

The litellm_proxy.auth_cache_invalidation channel is now a redis-store family on the redis-client publish and subscribe. It keeps the channel name, the message codec main writes and reads, the bounded background publish, the pipelined bulk eviction and the resubscribing stream

Each message is applied natively to the auth cache and the spend counters, then handed to a host callback for the caches still in Python. An eviction from another worker also voids the lease this worker holds on that key. The redis-py publisher and AuthCacheInvalidationSubscriber are deleted

The channel is prefixed with RedisCache.namespace, handed over when the channel starts, because the native client's own namespace misses one that Cache assigns after building the RedisCache. Publishes go through RedisClient::publish, outside the circuit breaker like the redis-py pub/sub client main published through, so an invalidation is sent the moment Redis is back and not after the breaker's recovery timeout

* refactor: rename native cache invalidation modules

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-21 18:58:27 +09:00
..
auth refactor(auth_cache): type auth cache keys and keep the cache always native (#51130) 2026-11-21 17:20:30 +09:00
faults feat(mcp): cache upstream tool lists with an admin-set lifetime (#51160) 2026-11-12 08:48:04 -08:00
guardrail_translation
outbound_credentials fix(mcp): preserve concurrent OAuth scope refusals (#52809) 2026-11-20 18:06:00 -08:00
__init__.py
conftest.py fix(mcp): preserve concurrent OAuth scope refusals (#52809) 2026-11-20 18:06:00 -08:00
test_byok_credential_cache.py refactor(auth_cache_invalidation): move the invalidation channel to the native client (#51135) 2026-11-21 18:58:27 +09:00
test_byok_oauth_endpoints.py refactor(auth_cache_invalidation): move the invalidation channel to the native client (#51135) 2026-11-21 18:58:27 +09:00
test_callback_oauth_error_responses.py
test_capabilities.py
test_catalog.py feat(auth): read projects, tags, access groups and object permissions through rust repositories (#52178) 2026-11-18 22:32:06 +00:00
test_client_allowlist.py
test_contracts.py
test_db_credentials.py fix(mcp): preserve concurrent OAuth scope refusals (#52809) 2026-11-20 18:06:00 -08:00
test_discoverable_endpoints.py refactor(auth_cache): type auth cache keys and keep the cache always native (#51130) 2026-11-21 17:20:30 +09:00
test_gateway_dcr_flow.py fix(mcp): decide connected from the provider's scope refusal, not from scope names (#51788) 2026-11-17 18:23:34 -08:00
test_id_jag_grant.py feat(auth): decide key and JWT authentication in a Rust core (#51374) 2026-11-17 14:07:47 +09:00
test_idp_token_exchange.py refactor(auth_cache): type auth cache keys and keep the cache always native (#51130) 2026-11-21 17:20:30 +09:00
test_interactions.py
test_is_tool_name_prefixed.py
test_jwt_mcp_enforcement.py fix(auth): check a mapped JWT's end-user claim and keep the error classes of refused keys and JWTs (#52397) 2026-11-18 03:36:46 +00:00
test_jwt_mcp_simple.py feat(auth): decide key and JWT authentication in a Rust core (#51374) 2026-11-17 14:07:47 +09:00
test_mcp_auth_header_extraction.py
test_mcp_auth_priority.py
test_mcp_block_recording.py
test_mcp_chat_completions.py
test_mcp_client_unit.py feat(mcp): cache upstream tool lists with an admin-set lifetime (#51160) 2026-11-12 08:48:04 -08:00
test_mcp_cost_calculator.py
test_mcp_custom_fields.py
test_mcp_debug.py
test_mcp_discovery.py feat(mcp): add Parallel to the MCP discovery registry (#52141) 2026-11-16 16:30:58 -08:00
test_mcp_elicitation_handler.py
test_mcp_env_vars.py feat(fips): encrypt stored secrets with the FIPS provider's AES-256-GCM in fips_mode (#51429) 2026-11-18 03:22:53 +00:00
test_mcp_guardrail_usage_monitor.py fix(mcp): refuse calls to guardrail-hidden tools (#48669) 2026-10-27 17:13:40 -07:00
test_mcp_header_alias_utils.py
test_mcp_hook_extra_headers.py fix(mcp): refuse calls to guardrail-hidden tools (#48669) 2026-10-27 17:13:40 -07:00
test_mcp_logging.py fix(mcp): log SDK request rejections (#49184) 2026-10-30 20:08:59 -07:00
test_mcp_max_concurrent_requests.py
test_mcp_metadata_preservation.py
test_mcp_oauth_passthrough.py
test_mcp_oauth_passthrough_cold_start.py
test_mcp_oauth_passthrough_tools.py test: drop the unit tests that flaked on main this week (#51488) 2026-11-12 17:32:49 -08:00
test_mcp_partial_update.py
test_mcp_proxy_mode.py feat(mcp): cache upstream tool lists with an admin-set lifetime (#51160) 2026-11-12 08:48:04 -08:00
test_mcp_sampling_completion_flow.py
test_mcp_sampling_model_access.py
test_mcp_sampling_model_resolution.py refactor(router): move router callers onto the entry points and invert the proxy imports (#48847) 2026-10-29 17:26:33 +00:00
test_mcp_sampling_priority_selection.py
test_mcp_sampling_request_builder.py
test_mcp_sampling_response_conversion.py
test_mcp_sampling_tool_conversion.py
test_mcp_server.py feat(mcp): cache upstream tool lists with an admin-set lifetime (#51160) 2026-11-12 08:48:04 -08:00
test_mcp_server_identity_env.py
test_mcp_server_manager.py refactor(auth_cache): type auth cache keys and keep the cache always native (#51130) 2026-11-21 17:20:30 +09:00
test_mcp_server_tool_calls_and_headers.py fix(mcp): let zero-budget users call MCP tools that cost nothing (#52130) 2026-11-16 17:44:44 -08:00
test_mcp_session_logging.py
test_mcp_sigv4_auth.py
test_mcp_stale_session.py
test_mcp_tool_search.py feat(mcp): cache upstream tool lists with an admin-set lifetime (#51160) 2026-11-12 08:48:04 -08:00
test_mcp_toolset_scope.py refactor(proxy): move non-auth writers out of the auth cache (#51599) 2026-11-20 17:57:38 +09:00
test_oauth2_flow_backfill.py
test_oauth2_mcp_config.yaml
test_oauth2_token_cache.py refactor(auth_cache_invalidation): move the invalidation channel to the native client (#51135) 2026-11-21 18:58:27 +09:00
test_oauth_identity_binding.py
test_oauth_issuer_stamp_backfill.py
test_openapi_spec_path_url.py fix(mcp): accept YAML OpenAPI documents (#48622) 2026-10-27 14:46:15 -07:00
test_openapi_to_mcp_generator.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
test_openapi_tool_auth.py
test_operations.py fix(mcp): return an upstream -32042 URL elicitation error from /mcp as a JSON-RPC error (#52384) 2026-11-19 08:56:01 -08:00
test_per_user_oauth_cache.py refactor(proxy): move non-auth writers out of the auth cache (#51599) 2026-11-20 17:57:38 +09:00
test_proxy_api_credentials.py refactor(auth_cache): type auth cache keys and keep the cache always native (#51130) 2026-11-21 17:20:30 +09:00
test_rest_endpoints.py fix(mcp)!: forward the LiteLLM key when the admin configures it (#50604) 2026-11-10 20:51:34 -08:00
test_result_conversion.py
test_semantic_tool_filter.py refactor(mcp): let the semantic filter take its MCP tool loader as a parameter (#50483) 2026-11-13 16:34:00 -08:00
test_server_resolution.py
test_short_mcp_tool_prefix.py
test_state_tokens.py
test_subscriptions.py
test_tool_registry.py
test_ui_session_utils.py
test_upstream.py feat(mcp): add an opt-in per-server setting to skip MCP tool output validation (#49961) 2026-11-03 20:42:10 -08:00
test_utils.py feat(auth): decide key and JWT authentication in a Rust core (#51374) 2026-11-17 14:07:47 +09:00