litellm/tests/unit/responses/mcp
joshua-berri 27e5c3ba75
fix(mcp)!: forward the LiteLLM key when the admin configures it (#50604)
* fix(mcp)!: forward the LiteLLM key when the admin configures it

Restores forwarding of the caller's LiteLLM key through explicit channels
(Extra Headers listing X-LiteLLM-API-Key or Authorization, x-mcp-{alias}-authorization
and x-mcp-auth) that #45401 and #46932 started stripping. Implicit Authorization
forwarding stays scrubbed for true_passthrough and unlisted servers, gateway
session tokens and bridge envelopes stay scrubbed, and guardrail and JWT signer
bearer reads now skip the admission key

* test(mcp): serve signer introspection from an in-process transport

* fix(mcp): copy oauth2 headers so a listed key never reaches a later server

* test(mcp): drive the shared-header regression through the real MCP client

---------

Co-authored-by: Joshua Valluru <326636767+joshua-berri@users.noreply.github.com>
2026-11-10 20:51:34 -08:00
..
__init__.py ci: move provider-independent MCP tests into tests/unit and run mcp-integration from litellm-tests (#42904) 2026-09-24 23:07:48 +00:00
conftest.py refactor(mcp): drop the experimental label from the MCP server and client paths (#48513) 2026-10-27 17:47:50 +00:00
test_aresponses_api_with_mcp.py fix(mcp)!: forward the LiteLLM key when the admin configures it (#50604) 2026-11-10 20:51:34 -08:00
test_chat_completions_handler.py fix(tool_choice): accept the Responses API's flat allowed_tools layout on chat completions (#50467) 2026-11-10 13:04:06 -08:00
test_litellm_proxy_mcp_handler.py fix(tool_choice): accept the Responses API's flat allowed_tools layout on chat completions (#50467) 2026-11-10 13:04:06 -08:00
test_mcp_streaming_iterator.py feat(guardrails): add mcp_block_behavior to raise 400 on MCP tool blocks (#50284) 2026-11-06 12:31:00 -08:00
test_parked_stream_dispatch.py fix(mcp): bill both calls of a streamed chat completions MCP auto-execute (#48899) 2026-10-30 07:34:10 -07:00
test_round_billing.py fix(mcp)!: bill both model calls of a chat completions MCP auto-execute on one spend row (#47422) 2026-10-20 04:37:31 +00:00
test_tool_precheck.py refactor(mcp): drop the experimental label from the MCP server and client paths (#48513) 2026-10-27 17:47:50 +00:00