fix: Resolve tool names in optim.find_tool to match routing table#3337
Merged
therealnb merged 3 commits intojerm/2026-01-13-optimizer-in-vmcpfrom Jan 19, 2026
Merged
fix: Resolve tool names in optim.find_tool to match routing table#3337therealnb merged 3 commits intojerm/2026-01-13-optimizer-in-vmcpfrom
therealnb merged 3 commits intojerm/2026-01-13-optimizer-in-vmcpfrom
Conversation
Resolve tool names dynamically in optim.find_tool by looking them up in the routing table. This ensures returned tool names match the keys used in the routing table, allowing optim.call_tool to successfully find and execute tools. Previously, optim.find_tool returned original tool names from the database, but optim.call_tool expected resolved names (after conflict resolution) that match routing table keys, causing 'tool not found in routing table' errors. Changes: - Add resolveToolName() helper to lookup resolved names in routing table - Modify convertSearchResultsToResponse() to accept routing table and resolve names - Update createFindToolHandler() to retrieve routing table from context Fixes https://github.com/StacklokLabs/research/issues/141
The test was failing because registry.List() returns backends in a non-deterministic order. Use gomock.Do() to verify backend contents regardless of order instead of expecting an exact slice match.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## jerm/2026-01-13-optimizer-in-vmcp #3337 +/- ##
====================================================================
Coverage ? 62.25%
====================================================================
Files ? 376
Lines ? 37018
Branches ? 0
====================================================================
Hits ? 23045
Misses ? 12115
Partials ? 1858 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c1803da
into
jerm/2026-01-13-optimizer-in-vmcp
26 checks passed
This was referenced Jan 21, 2026
Closed
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.
Resolve tool names dynamically in optim.find_tool by looking them up in the routing table. This ensures returned tool names match the keys used in the routing table, allowing optim.call_tool to successfully find and execute tools.
Previously, optim.find_tool returned original tool names from the database, but optim.call_tool expected resolved names (after conflict resolution) that match routing table keys, causing 'tool not found in routing table' errors.
Changes:
Fixes https://github.com/StacklokLabs/research/issues/141