feat: file_search tool support with Files & Vector Stores APIs#22
Closed
franciscojavierarceo wants to merge 12 commits into
Closed
feat: file_search tool support with Files & Vector Stores APIs#22franciscojavierarceo wants to merge 12 commits into
franciscojavierarceo wants to merge 12 commits into
Conversation
Signed-off-by: maral <maralbahari.98@gmail.com>
Co-authored-by: Tan Jia Huei tanjiahuei@gmail.com Co-authored-by: noobHappylife aratar1991@hotmail.com Co-authored-by: Claude Signed-off-by: maralbahari maralbahari.98@gmail.com Signed-off-by: maral <maralbahari.98@gmail.com>
Co-authored-by: Claude Signed-off-by: maralbahari maralbahari.98@gmail.com Signed-off-by: maral <maralbahari.98@gmail.com>
Signed-off-by: maral <maralbahari.98@gmail.com>
Signed-off-by: maral <maralbahari.98@gmail.com>
Signed-off-by: maral <maralbahari.98@gmail.com>
Signed-off-by: maral <maralbahari.98@gmail.com>
Co-authored-by: Claude Signed-off-by: maral <maralbahari.98@gmail.com>
Signed-off-by: maral <maralbahari.98@gmail.com>
Add file upload/management (Files API) and vector store CRUD with hybrid search (Vector Stores API). Search supports vector (sqlite-vec with native predicate pushdown), keyword (FTS5/BM25), and hybrid (RRF/weighted reranking) modes. Embeddings are generated via an external vLLM /v1/embeddings endpoint. New components: - Files API: upload, list, get, delete, content retrieval - Vector Stores API: store CRUD, file attachment with chunking, search with three modes - Token-based text chunking (tiktoken) - Embedding client (async httpx) - sqlite-vec + FTS5 search tables with predicate pushdown - RRF and weighted score fusion for hybrid search Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Connect vector stores to the engine so the model can call file_search as a tool during a response. When a request includes a FileSearchTool in its tools list, the engine creates a pydantic_ai FunctionToolset with a file_search function that queries the configured vector stores via VectorStoreManager and returns ranked results as JSON. Changes: - Add FileSearchExecutor (core/file_search.py) - Add FileSearchTool and FileSearchToolCall to ResponsesTool/OutputItem unions in types/responses.py - Wire vector_store_manager through Engine and responses router - Unit tests for FileSearchExecutor Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
leseb
requested changes
May 11, 2026
Collaborator
leseb
left a comment
There was a problem hiding this comment.
given our recent direction to move to rust, i believe this should be closed.
Collaborator
Author
|
@leseb agreed |
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
Adds
file_searchtool support to the Responses API, backed by sqlite-vec (vector), FTS5 (keyword), and hybrid search with RRF/weighted reranking. Embeddings are generated via the upstream vLLM/v1/embeddingsendpoint.Note: This is a draft — we may instead integrate OGX's existing file_search implementation rather than maintaining a separate one here. OGX already implements prompts, conversations, and file_search with a battle-tested retrieval stack.
Depends on: #21 (responses-flow)
Commit 1: Files API + Vector Stores API
POST /v1/files, etc.)POST /v1/vector_stores, etc.)/v1/embeddingsCommit 2: file_search integration with Responses API
FileSearchExecutorexecutes file_search tool calls againstVectorStoreManagerFileSearchTool/FileSearchToolCalladded toResponsesTool/OutputItemtype unionsFunctionToolsetwhenfile_searchis in the request toolsvector_store_managerwired through router → engineTest plan
ruff checkandruff formatclean🤖 Generated with Claude Code