Skip to content

Conversation

@szedan-rh
Copy link
Contributor

Summary

This PR adds end-to-end test coverage for the MCP (Model Context Protocol) classifier.

Changes

  • 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
  • Add MCP_ROUTING_AND_REQUEST_FLOW.md documentation

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

@netlify
Copy link

netlify bot commented Nov 30, 2025

Deploy Preview for vllm-semantic-router ready!

Name Link
🔨 Latest commit 1c3ddcf
🔍 Latest deploy log https://app.netlify.com/projects/vllm-semantic-router/deploys/692d3e0d43096b000973d441
😎 Deploy Preview https://deploy-preview-743--vllm-semantic-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link

github-actions bot commented Nov 30, 2025

👥 vLLM Semantic Team Notification

The following members have been identified for the changed files in this PR and have been automatically assigned:

📁 e2e

Owners: @Xunzhuo
Files changed:

  • e2e/profiles/routing-strategies/values-mcp.yaml
  • e2e/testcases/mcp_common.go
  • e2e/testcases/mcp_fallback_behavior.go
  • e2e/testcases/mcp_http_classification.go
  • e2e/testcases/mcp_model_reasoning.go
  • e2e/testcases/mcp_probability_distribution.go
  • e2e/testcases/mcp_stdio_classification.go
  • e2e/testcases/testdata/mcp/mcp_fallback_cases.json
  • e2e/testcases/testdata/mcp/mcp_http_cases.json
  • e2e/testcases/testdata/mcp/mcp_model_reasoning_cases.json
  • e2e/testcases/testdata/mcp/mcp_probability_cases.json
  • e2e/testcases/testdata/mcp/mcp_stdio_cases.json
  • e2e/profiles/routing-strategies/profile.go

📁 Root Directory

Owners: @rootfs, @Xunzhuo
Files changed:

  • examples/mcp-classifier-server/server_keyword.py

vLLM

🎉 Thanks for your contributions!

This comment was automatically generated based on the OWNER files in the repository.

- 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>
@szedan-rh
Copy link
Contributor Author

@Xunzhuo - Could you please review?

Copy link
Member

@Xunzhuo Xunzhuo left a 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"
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Agree with you

@Xunzhuo Xunzhuo merged commit 327eeb5 into vllm-project:main Dec 1, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants