Created comprehensive test coverage in req_filter_tools_test.go with …#848
Merged
Conversation
✅ Deploy Preview for vllm-semantic-router ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
👥 vLLM Semantic Team NotificationThe following members have been identified for the changed files in this PR and have been automatically assigned: 📁
|
59dd8c7 to
4bd90f9
Compare
…27 test cases covering Signed-off-by: Senan Zedan <szedan@redhat.com>
- Fixed err shadowing in extproc_test.go by renaming to loadErr - Fixed router shadowing in req_filter_tools_test.go by using testRouter - All pre-commit checks now pass Signed-off-by: Senan Zedan <szedan@redhat.com>
- Changed CreateTestConfig to use all-MiniLM-L6-v2 instead of L12-v2 - This matches the model initialized in tool selection test BeforeEach - Prevents singleton initialization conflicts that cause embedding generation to fail Signed-off-by: Senan Zedan <szedan@redhat.com>
Signed-off-by: Senan Zedan <szedan@redhat.com>
The 'Similarity Threshold Filtering' tests were modifying cfg.ToolSelection.Tools.SimilarityThreshold after the router was already created in BeforeEach. This caused the tests to use the default threshold (0.2) instead of the test-specific thresholds (0.7, 0.99, 0.5). The fix recreates the router after setting the new threshold value in each test, ensuring the ToolsDatabase is initialized with the correct threshold. This fixes the failing test: - 'should return empty list when no tools meet high threshold' And prevents similar issues in three other tests in the same describe block. Signed-off-by: Senan Zedan <szedan@redhat.com>
276194a to
4b64788
Compare
Collaborator
Author
rootfs
approved these changes
Dec 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Created comprehensive test coverage in req_filter_tools_test.go with 27 test cases covering:
Fixes Applied
- Use tools-specific similarity threshold from config
- Load tools from database file when enabled
- Properly initialize ToolsDatabase with correct configuration