fix: add required search_mode param to knowledge_hit_test#2
Open
itsablabla wants to merge 1 commit intomainfrom
Open
fix: add required search_mode param to knowledge_hit_test#2itsablabla wants to merge 1 commit intomainfrom
itsablabla wants to merge 1 commit intomainfrom
Conversation
MaxKB API requires the search_mode field in hit_test requests. Without it, the API returns a 500 error. Added search_mode parameter with options: 'embedding' (vector), 'keywords' (full-text), or 'blend' (hybrid), defaulting to 'embedding'.
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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
MaxKB API requires the
search_modefield in hit_test requests. Without it, the API returns a 500 error (搜索模式:该字段不能为 null). This adds thesearch_modeparameter to theknowledge_hit_testtool with three options:embedding(vector search) — defaultkeywords(full-text search)blend(hybrid)Discovered during a routine health check of maxkb.garzaos.cloud — all 3 knowledge bases are healthy and retrieval works correctly with this fix applied.
Review & Testing Checklist for Human
knowledge_hit_testworks via the MCP server with each search mode (embedding,keywords,blend)embeddingmode returns results without requiring the caller to specify itNotes
unless-stopped/docker/maxkb-mcpneeds to be rebuilt withdocker compose up -d --buildto pick up this fixLink to Devin session: https://app.devin.ai/sessions/80ece13d93aa4fcfb3d108cba74953ff
Requested by: @itsablabla