-
Notifications
You must be signed in to change notification settings - Fork 302
feat(e2e): add comprehensive E2E test coverage for MCP classifier #743
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
Conversation
✅ Deploy Preview for vllm-semantic-router ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
👥 vLLM Semantic Team NotificationThe following members have been identified for the changed files in this PR and have been automatically assigned: 📁
|
- Add 5 new test cases for MCP classification: - mcp-stdio-classification: Tests stdio transport - mcp-http-classification: Tests HTTP transport - mcp-model-reasoning: Tests model recommendations and reasoning flags - mcp-probability-distribution: Tests probability arrays and entropy - mcp-fallback-behavior: Tests fallback to in-tree classifier - Add test data with 34 test cases covering math, science, technology, history, and general categories - Add common helpers in mcp_common.go for test execution and validation - Update routing-strategies profile to manage MCP server lifecycle - Add values-mcp.yaml for MCP-enabled semantic router configuration - Add MCP_ROUTING_AND_REQUEST_FLOW.md documentation Test Coverage: ✅ MCP stdio transport (process communication) ✅ MCP HTTP transport (API calls) ✅ Custom classification logic via external servers ✅ Model and reasoning decisions from MCP ✅ Fallback behavior on MCP failures ✅ Probability distribution validation Signed-off-by: Senan Zedan <szedan@redhat.com>
- Add 5 new test cases: stdio/HTTP transport, model reasoning, probability distribution, and fallback behavior - Add 34 test cases covering math, science, technology, history, and general categories - Add mcp_common.go with shared helper functions - Update routing-strategies profile to manage MCP server lifecycle - Add values-mcp.yaml configuration for MCP-enabled deployment Test Coverage: ✅ MCP stdio transport (process communication) ✅ MCP HTTP transport (API calls) ✅ Custom classification via external servers ✅ Model and reasoning decisions from MCP ✅ Fallback to in-tree classifier on failures ✅ Probability distribution validation Signed-off-by: Senan Zedan <szedan@redhat.com>
Signed-off-by: Senan Zedan <szedan@redhat.com>
- Fix MCP server filename (server_keyword.py.py) - Make MCP server startup optional and non-blocking - Comment out MCP tests from default routing-strategies suite - MCP tests are still registered and can be run explicitly with E2E_TESTS parameter - This prevents CI failures when Python dependencies or MCP servers are unavailable Signed-off-by: Senan Zedan <szedan@redhat.com>
- Remove duplicate .py extension from MCP keyword server filename - Update profile.go to reference correct filename - This fixes the inconsistency with other server files (server_embedding.py, server_generative.py) Signed-off-by: Senan Zedan <szedan@redhat.com>
|
@Xunzhuo - Could you please review? |
Xunzhuo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool! thanks for adding it
| # MCP category model configuration | ||
| mcp_category_model: | ||
| enabled: true | ||
| transport_type: "stdio" # Options: "stdio" or "http" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add http based mcp config later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, Agree with you

Summary
This PR adds end-to-end test coverage for the MCP (Model Context Protocol) classifier.
Changes
mcp_common.gowith shared helper functionsrouting-strategiesprofile to manage MCP server lifecyclevalues-mcp.yamlconfiguration for MCP-enabled deploymentMCP_ROUTING_AND_REQUEST_FLOW.mddocumentationTest Coverage
✅ MCP stdio transport (process communication)
✅ MCP HTTP transport (API calls)
✅ Custom classification via external servers
✅ Model and reasoning decisions from MCP
✅ Fallback to in-tree classifier on failures
✅ Probability distribution validation