Skip to content

Conversation

rootfs
Copy link
Collaborator

@rootfs rootfs commented Oct 12, 2025

What type of PR is this?

Followup #368 to support system prompt injection for each category.

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Release Notes: Yes/No

Copy link

github-actions bot commented Oct 12, 2025

👥 vLLM Semantic Team Notification

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

📁 config

Owners: @rootfs
Files changed:

  • config/config-mcp-classifier-example.yaml

📁 Root Directory

Owners: @rootfs, @Xunzhuo
Files changed:

  • examples/mcp-classifier-server/README.md
  • examples/mcp-classifier-server/server.py

📁 src

Owners: @rootfs, @Xunzhuo, @wangchen615
Files changed:

  • src/semantic-router/pkg/connectivity/mcp/api/types.go
  • src/semantic-router/pkg/utils/classification/classifier.go
  • src/semantic-router/pkg/utils/classification/mapping.go
  • src/semantic-router/pkg/utils/classification/mcp_classifier.go
  • src/semantic-router/pkg/utils/classification/mcp_classifier_test.go

vLLM

🎉 Thanks for your contributions!

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

@rootfs rootfs requested a review from Copilot October 12, 2025 19:55
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR extends the MCP classifier functionality to support per-category system prompts and descriptions. It enables MCP servers to provide specialized system prompts for each category that the router can inject when processing queries, allowing for domain-specific LLM behavior.

Key changes:

  • Added support for storing and retrieving per-category system prompts and descriptions from MCP servers
  • Enhanced the CategoryMapping and Classifier structs with new methods to access category-specific metadata
  • Updated the MCP server example to demonstrate per-category system prompt usage

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/semantic-router/pkg/utils/classification/mcp_classifier_test.go Added comprehensive tests for per-category system prompt functionality
src/semantic-router/pkg/utils/classification/mcp_classifier.go Updated to store category system prompts and descriptions from MCP response
src/semantic-router/pkg/utils/classification/mapping.go Added fields and methods for category system prompts and descriptions
src/semantic-router/pkg/utils/classification/classifier.go Added public methods to retrieve category system prompts and descriptions
src/semantic-router/pkg/connectivity/mcp/api/types.go Extended ListCategoriesResponse with system prompts and descriptions fields
examples/mcp-classifier-server/server.py Enhanced to provide per-category system prompts and descriptions
examples/mcp-classifier-server/README.md Updated documentation to explain per-category system prompt usage
config/config-mcp-classifier-example.yaml Added extensive comments explaining the new functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

netlify bot commented Oct 12, 2025

Deploy Preview for vllm-semantic-router ready!

Name Link
🔨 Latest commit 656de69
🔍 Latest deploy log https://app.netlify.com/projects/vllm-semantic-router/deploys/68ed4a40e12d790008bfad48
😎 Deploy Preview https://deploy-preview-408--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.

@rootfs rootfs requested a review from Copilot October 12, 2025 20:26
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Collaborator

@wangchen615 wangchen615 left a comment

Choose a reason for hiding this comment

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

LGTM

@rootfs rootfs merged commit f639048 into vllm-project:main Oct 13, 2025
16 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