Skip to content

fix: add required search_mode param to knowledge_hit_test#2

Open
itsablabla wants to merge 1 commit intomainfrom
devin/1776034696-fix-hit-test-search-mode
Open

fix: add required search_mode param to knowledge_hit_test#2
itsablabla wants to merge 1 commit intomainfrom
devin/1776034696-fix-hit-test-search-mode

Conversation

@itsablabla
Copy link
Copy Markdown
Owner

@itsablabla itsablabla commented Apr 12, 2026

Summary

MaxKB API requires the search_mode field in hit_test requests. Without it, the API returns a 500 error (搜索模式:该字段不能为 null). This adds the search_mode parameter to the knowledge_hit_test tool with three options:

  • embedding (vector search) — default
  • keywords (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

  • Verify knowledge_hit_test works via the MCP server with each search mode (embedding, keywords, blend)
  • Confirm the default embedding mode returns results without requiring the caller to specify it

Notes

  • Also restarted both MaxKB containers on VPS (they were down with exit code 255) and fixed restart policies to unless-stopped
  • The MaxKB MCP container on VPS at /docker/maxkb-mcp needs to be rebuilt with docker compose up -d --build to pick up this fix
  • VPS health: 73% disk, 10/31 GB RAM, all 3 KBs operational (147 total documents, 2.9M+ chars)

Link to Devin session: https://app.devin.ai/sessions/80ece13d93aa4fcfb3d108cba74953ff
Requested by: @itsablabla


Open with Devin

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'.
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

1 participant