fix: allow qveris_call without prior discover step#120
Merged
Conversation
Remove the mandatory discover-before-call restriction that caused 190 tool_not_discovered errors in production. When search_id is not available from a prior discover, pass null to the backend API (which accepts it), matching the behavior of open-qveris-skills. Models that do discover first still benefit from session tracking via the rolodex/discoverTracker registries. Models that skip discover now proceed instead of being blocked. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request updates the qveris_call tool to allow an optional searchId, enabling the tool to proceed even when a searchId is not provided. The previous validation logic that returned a tool_not_discovered error when searchId was missing has been removed, and the API request now explicitly sends null for search_id if it is undefined. I have no feedback to provide.
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.
Summary
tool_not_discoveredgate inqveris_callthat blocked calls whensearch_idwas not in the session registrysearchIdoptional inqverisCall(), passingnullto the backend API when unavailable (backend accepts it)nullsearch_id instead of being blockedMotivation
Production analysis of QVerisBot2 over 792 user messages (2026-03-27 to 2026-04-07) found 190
tool_not_discoverederrors — the single largest source of tool failures. The model (kimi-k2.5) memorized tool_ids from prior sessions and called them directly, skipping the discover step. While 85% self-recovered by retrying with discover, each error added 1-3 seconds latency and wasted API calls.The QVeris backend API accepts
nullsearch_id(proven byopen-qveris-skillswhich has always worked this way). The restriction was client-side only.Behavior change
nullsearch_id instead of returning errorTest plan
search_id: null🤖 Generated with Claude Code