Repository navigation
fix(mcp): surface upstream 401 for token-forwarding MCP servers #27847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mateo-berri
merged 16 commits into
litellm_internal_staging
from
litellm_mcp_passthrough_upstream_401
May 13, 2026
Merged
Changes from 3 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
7165d6f
fix(mcp): surface upstream 401 for token-forwarding MCP servers
Sameerlite 2982355
fix(mcp): parallelize pre-flight auth probes and use HEAD to avoid si…
Sameerlite 25ec4b1
fix(mcp): use get_async_httpx_client in _probe_upstream_auth
Sameerlite 5b13913
refactor(mcp): extract pre-flight probe into _check_passthrough_upstr…
Sameerlite d25cb57
fix(mcp): gate pre-flight probes on authorized server set to prevent …
Sameerlite b211144
Add async HTTP HEAD support
cursoragent d4d6155
fix(mcp): use Scope type annotation in _get_forwarded_auth_from_scope
Sameerlite 73e41f6
Fix MCP upstream auth probe method
cursoragent ade8ca1
Remove unused AsyncHTTPHandler head method
cursoragent 6e3d676
fix(mcp): exclude has_client_credentials servers from pre-flight auth…
Sameerlite 1925335
fix(mcp): propagate upstream 403 as 403, not 401 with WWW-Authenticate
Sameerlite e88c5ab
fix(mcp): skip auth probe when Authorization may be the LiteLLM proxy…
851d9f6
Fix MCP ASGI HTTPException propagation
cursoragent 560c22b
fix(mcp): use public AsyncHTTPHandler.post() in auth probe
c07b62a
Fix MCP auth probe tests
cursoragent 28eda2a
test(mcp): add coverage for httpx.HTTPStatusError path in auth probe
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.