Repository navigation
test(mcp): cover SDK redirect compatibility - #42033
Conversation
|
@greptileai Please review 064b7d1 for SDK redirect coverage, meaningful credential assertions, test isolation, and the existing client helper reuse |
|
bugbot run. Please review 064b7d1 for real SDK execution, zero destination requests, meaningful tool results, and bounded cleanup |
|
@veria-ai Please review 064b7d1 for redirect credential isolation, rejected destination side effects, existing policy preservation, and focused test coverage |
|
|
@greptileai Please review 7cd96e9: SDK wording dependency removed, denial side effects remain covered, and the quoted documentation rule exempts READMEs |
|
bugbot run. Please review 7cd96e9: rejection assertions now tolerate SDK wording changes while preserving credential and zero destination request checks |
|
@veria-ai Please review 7cd96e9 for credential isolation and zero rejected-destination traffic, with SDK error wording removed from regression assertions |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 7cd96e9. Configure here.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
TLDR
Problem this solves:
How it solves it:
User Flow
Before: redirect behavior works, but SDK-level regression coverage is missing
addwith arguments2and3, receiving5After: the same behavior is protected by focused tests and documented
addwith arguments2and3, receiving5Relevant issues
Follow-up coverage for merged #41718, preserving its SDK2 adapter implementation
Affected release
No new production behavior change
Linear ticket
Resolves LIT-7738
https://linear.app/litellm-ai/issue/LIT-7738/mcp-phase-0-mcp-httpx2-adapter-integration
Pre-Submission checklist
Screenshots / Proof of Fix
Controlled live HTTP upstream on
127.0.0.1:8091, using the same observer for each source build./redirect/mcpreturns307 to/ok/mcp;/xredirect/mcpreturns307 tolocalhost:8091/ok/mcp, a different origin. Synthetic credential only, recorded as presence. The client uses actual network requests through LiteLLM and MCP SDK2. No LLM neededThe independent verifier runs
uv run --no-sync python /home/ubuntu/lit7738/redirect_probe.py 8091from each source checkout. Exact script, sanitized output, import paths and source hashes are retained with the ticket evidenceBefore (7651d6b)
Same-origin redirect
add(2,3)through/redirect/mcpadd, result5, and credential presence on redirected requestsCross-origin redirect
add(2,3)through/xredirect/mcpin separate operationsAfter (7cd96e9)
Same-origin redirect
add(2,3)through/redirect/mcpadd, result5, and credential presence on redirected requestsCross-origin redirect
add(2,3)through/xredirect/mcpin separate operationsIndependent verifier: all five live cases passed on both commits, and all 192 mapped tests passed at the final tip in 11.82s. Local negative controls fail when same-origin redirects are blocked or cross-origin requests are allowed
Type
Test and documentation
Caveats
Low
Final Attestation