Skip to content

Conversation

@srini-abhiram
Copy link
Contributor

FIX #713

  • Make sure the code changes pass the pre-commit checks.
  • Sign-off your commit by using -s when doing git commit
  • Try to classify PRs for easy understanding of the type of changes, such as [Bugfix], [Feat], and [CI].

E2E tests revealed that keyword matching was highly unreliable:

  • Only "ASAP" keyword worked consistently
  • Other keywords ("urgent", "immediate", "think", "careful") failed sporadically
  • Same keywords succeeded in some queries but failed in others
  • keyword-routing test: 17% accuracy (1/6 pass)
  • rule-condition-logic test: 33% accuracy (2/6 pass)

Test Results

Metric Before After Improvement
Keyword Routing Accuracy 16.67% (1/6) 100% (6/6) +83.33%
Rule Condition Logic 33.33% (2/6) 83.33% (5/6)* +50%

* The remaining failure is a domain classification ML model accuracy issue (physics query misclassified as psychology), which is unrelated to the keyword matching bug that was fixed.

Test Cases Now Passing

All keyword-based routing test cases now pass:

  • "This is URGENT and needs immediate attention" → thinking_decision
  • "Please think carefully about this problem" → thinking_decision
  • "We need this done ASAP" → thinking_decision
  • "urgent: please think about this immediately" → thinking_decision
  • "What is 2 + 2?" → math_decision (no keyword match)
  • "I need you to think through this step by step carefully" → thinking_decision

@netlify
Copy link

netlify bot commented Nov 26, 2025

Deploy Preview for vllm-semantic-router ready!

Name Link
🔨 Latest commit 14285ed
🔍 Latest deploy log https://app.netlify.com/projects/vllm-semantic-router/deploys/6926a9b1ae0aab00085352af
😎 Deploy Preview https://deploy-preview-736--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.

@srini-abhiram srini-abhiram changed the title [Bugfix] Fix keyword matching inconsistency in Kubernetes dynamic config mode [Bugfix] Fix keyword matching inconsistency in e2e tests Nov 26, 2025
…llm-project#713)

Fixes two critical bugs causing keyword routing E2E test failures:

1. **Config merge bug**: Embedded struct assignment in reconciler didn't copy
   IntelligentRouting fields correctly. Changed to explicit field-by-field copy
   to ensure keyword rules are properly loaded from CRDs.

2. **Cache hit headers bug**: Cache responses used ImmediateResponse which
   bypassed normal header processing, causing VSR decision headers to be missing.
   Added vsrDecisionName parameter to CreateCacheHitResponse() to include
   x-vsr-selected-decision header in cached responses.

**Test Results:**
- keyword-routing: 16.67% -> 100%
- rule-condition-logic: 33.33% -> 83.33% (remaining failure is unrelated)

Fixes vllm-project#713

Signed-off-by: Srinivas A <56465971+srini-abhiram@users.noreply.github.com>
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.

[Test] Keyword Matching Unreliable - Only 'ASAP' Works Consistently

1 participant