Skip to content

Conversation

rootfs
Copy link
Collaborator

@rootfs rootfs commented Oct 3, 2025

What type of PR is this?

Fix #318

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Release Notes: Yes/No

Signed-off-by: Huamin Chen <hchen@redhat.com>
Copy link

netlify bot commented Oct 3, 2025

Deploy Preview for vllm-semantic-router ready!

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

Copy link

github-actions bot commented Oct 3, 2025

👥 vLLM Semantic Team Notification

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

📁 src

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

  • src/semantic-router/pkg/services/classification.go

vLLM

🎉 Thanks for your contributions!

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

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 modifies the classification service to use both unified and legacy classifiers as fallbacks to prevent service failures. The changes ensure that if one classifier fails to initialize, the service can still operate using the other classifier.

Key changes:

  • Modified NewUnifiedClassificationService to accept both unified and legacy classifiers
  • Updated auto-discovery logic to attempt initializing both classifier types
  • Added a new createLegacyClassifier function to properly initialize legacy classifiers

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

if ucErr != nil {
observability.Infof("Unified classifier auto-discovery failed: %v", ucErr)
}
// create legacy classifier
Copy link
Preview

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

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

Comment should start with a capital letter: 'Create legacy classifier'.

Suggested change
// create legacy classifier
// Create legacy classifier

Copilot uses AI. Check for mistakes.

@rootfs
Copy link
Collaborator Author

rootfs commented Oct 3, 2025

test result:

$ curl -X POST http://localhost:8080/api/v1/classify/intent   -H "Content-Type: application/json"   -d '{"text": "What is machine learning?"}'
{"classification":{"category":"computer science","confidence":0.8515688180923462,"processing_time_ms":131},"recommended_model":"computer science-specialized-model","routing_decision":"high_confidence_specialized"}

@rootfs rootfs merged commit ce0cec2 into vllm-project:main Oct 3, 2025
8 of 9 checks passed
Aias00 pushed a commit to Aias00/semantic-router that referenced this pull request Oct 4, 2025
…project#332)

Signed-off-by: Huamin Chen <hchen@redhat.com>
Signed-off-by: liuhy <liuhongyu@apache.org>
Aias00 pushed a commit to Aias00/semantic-router that referenced this pull request Oct 4, 2025
…project#332)

Signed-off-by: Huamin Chen <hchen@redhat.com>
Signed-off-by: liuhy <liuhongyu@apache.org>
Aias00 pushed a commit to Aias00/semantic-router that referenced this pull request Oct 4, 2025
…project#332)

Signed-off-by: Huamin Chen <hchen@redhat.com>
Signed-off-by: liuhy <liuhongyu@apache.org>
Aias00 pushed a commit to Aias00/semantic-router that referenced this pull request Oct 4, 2025
…project#332)

Signed-off-by: Huamin Chen <hchen@redhat.com>
Signed-off-by: liuhy <liuhongyu@apache.org>
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.

Batch Classification API Returns Incorrect Categories with Poor Accuracy
3 participants