feat: add WarpGrep (Morph) as optional code search provider#4458
Draft
DhruvBhatia0 wants to merge 1 commit intoTabbyML:mainfrom
Draft
feat: add WarpGrep (Morph) as optional code search provider#4458DhruvBhatia0 wants to merge 1 commit intoTabbyML:mainfrom
DhruvBhatia0 wants to merge 1 commit intoTabbyML:mainfrom
Conversation
…r engine Add WarpGrep as a supplemental code search backend, following the existing Serper integration pattern. WarpGrep is an RL-trained codebase search agent by Morph that performs multi-turn agentic search with local tool execution (grep, read, list_directory). Enabled via MORPH_API_KEY env var. Users bring their own key. When enabled, WarpGrep results are merged with existing Tantivy results in the answer engine. Completions are unaffected. Closes TabbyML#4452 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
MORPH_API_KEY), factory closure,Optionfield inRetrievalServiceHow it works
MORPH_API_KEY(and optionallyMORPH_API_ENDPOINT,MORPH_MODEL)webserver.rscreates aWarpGrepServicevia factory closure fromserve.rsRetrievalService::collect_relevant_code(), after Tantivy search, WarpGrep runs as a supplemental search(filepath, start_line), and sorted by RRF scoreFiles changed
crates/tabby/src/services/warpgrep/mod.rscrates/tabby/src/services/warpgrep/tool_executor.rscrates/tabby-common/src/api/code.rsWarpGrepSearchtraitcrates/tabby/src/serve.rsws.attach()ee/tabby-webserver/src/webserver.rsMORPH_API_KEYenv check, passes to retrievalee/tabby-webserver/src/service/retrieval.rswarpgrepfield, supplemental search incollect_relevant_code()ee/.../answer.rs,thread.rs,page.rsNonewarpgrep paramSecurity
canonicalize()+ prefix check on all tool executor paths-F) to prevent ReDoS from LLM-supplied patternsTest plan
cargo checkpasses ontabby-common,tabby,tabby-webservercargo fmt --checkcleancargo clippyclean (no new warnings)Closes #4452