✨ add RAG search API - #476
Open
ianardee wants to merge 4 commits into
Open
Conversation
ianardee
force-pushed
the
rag-search
branch
15 times, most recently
from
August 18, 2026 15:20
dce2e68 to
24d9fd7
Compare
ianardee
marked this pull request as ready for review
August 18, 2026 15:21
There was a problem hiding this comment.
Pull request overview
This PR introduces a generalized V2 Search API (including Models and RAG Documents searches) and refactors V2 product parameter handling to use a Record<string, string> request-parameter flow that is later converted to FormData in the HTTP layer.
Changes:
- Add V2 search framework (
BaseSearch) plus concrete searches for Models and RAG Documents, including responses/parameters and tests. - Refactor V2 product parameter base class from
BaseParameters→BaseProductParametersand move product enqueue parameter serialization toMindeeApiV2. - Deprecate legacy
SearchResponsein favor of the newModelSearchResponse, and increase timeouts for several V1 integration tests.
Reviewed changes
Copilot reviewed 44 out of 44 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/v2/search/ragDocumentSearch.spec.ts | Adds local deserialization unit test for RAG document search response. |
| tests/v2/search/ragDocumentSearch.integration.ts | Adds integration test for RAG document search endpoint via client.search. |
| tests/v2/search/modelSearch.spec.ts | Adds local deserialization unit test for model search response. |
| tests/v2/search/modelSearch.integration.ts | Adds integration tests for model search endpoint via client.search. |
| tests/v2/parsing/search.spec.ts | Removes old local parsing test for legacy SearchResponse. |
| tests/v1/workflows/workflow.integration.ts | Increases integration timeout. |
| tests/v1/input/urlInputSource.integration.ts | Increases integration timeout. |
| tests/v1/input/sources.integration.ts | Increases integration timeout. |
| tests/v1/extras/extras.integration.ts | Increases integration timeout. |
| tests/v1/extraction/multiReceipts.integration.ts | Increases integration timeout. |
| tests/v1/extraction/invoiceSplitter.integration.ts | Increases integration timeout. |
| src/v2/search/ragDocuments/ragDocumentSearchResponse.ts | Adds V2 response class for RAG documents search. |
| src/v2/search/ragDocuments/ragDocumentSearchParameters.ts | Adds V2 parameter class for RAG documents search (requires modelId). |
| src/v2/search/ragDocuments/ragDocuments.ts | Adds RagDocuments search definition (slug, params/response classes). |
| src/v2/search/ragDocuments/index.ts | Exports RAG documents search components. |
| src/v2/search/models/modelSearchResponse.ts | Adds V2 response class for model search. |
| src/v2/search/models/modelSearchParameters.ts | Adds V2 parameter class for model search filters. |
| src/v2/search/models/models.ts | Adds Models search definition (slug, params/response classes). |
| src/v2/search/models/index.ts | Exports models search components. |
| src/v2/search/index.ts | Exposes the new V2 search module (namespaced + named exports). |
| src/v2/search/baseSearch.ts | Introduces base class contract for all V2 searches. |
| src/v2/product/split/split.ts | Updates doc comments to @inheritDoc. |
| src/v2/product/split/params/splitParameters.ts | Migrates Split params to BaseProductParameters. |
| src/v2/product/ocr/params/ocrParameters.ts | Migrates OCR params to BaseProductParameters. |
| src/v2/product/ocr/ocr.ts | Updates doc comments to @inheritDoc. |
| src/v2/product/extraction/params/extractionParameters.ts | Migrates Extraction params to BaseProductParameters and to request-parameter record. |
| src/v2/product/extraction/extraction.ts | Updates doc comments to @inheritDoc. |
| src/v2/product/crop/params/cropParameters.ts | Migrates Crop params to BaseProductParameters. |
| src/v2/product/crop/crop.ts | Updates doc comments to @inheritDoc. |
| src/v2/product/classification/params/classificationParameters.ts | Migrates Classification params to BaseProductParameters. |
| src/v2/product/classification/classification.ts | Updates doc comments to @inheritDoc. |
| src/v2/product/baseProduct.ts | Switches product base to BaseProductParameters and improves doc comments. |
| src/v2/parsing/search/searchResponse.ts | Deprecates legacy SearchResponse by inheriting from ModelSearchResponse. |
| src/v2/parsing/search/searchRagDocuments.ts | Adds parsing container for RAG document list. |
| src/v2/parsing/search/searchRagDocument.ts | Adds parsing model for an individual RAG document entry. |
| src/v2/parsing/search/searchModels.ts | Adds parsing container for model list. |
| src/v2/parsing/search/index.ts | Exposes new search parsing primitives (BaseSearchResponse, SearchRagDocument). |
| src/v2/parsing/search/baseSearchResponse.ts | Adds shared pagination + toString() behavior for search responses. |
| src/v2/index.ts | Exposes the new search module and renames exported parameter type. |
| src/v2/http/mindeeApiV2.ts | Generalizes GET search request handling and centralizes params→FormData conversion. |
| src/v2/clientOptions/index.ts | Exports BaseProductParameters and BaseSearchParameters. |
| src/v2/clientOptions/baseSearchParameters.ts | Adds base pagination parameters for searches. |
| src/v2/clientOptions/baseProductParameters.ts | Renames/refactors base product parameters to return request-parameter records. |
| src/v2/client.ts | Adds generic client.search() entrypoint and deprecates searchModels(). |
Suppressed comments (1)
src/v2/search/baseSearch.ts:18
- The thrown error message references a "response" property, but the required static getter is
responseClass. Updating the message makes debugging misconfigured searches much clearer.
static get responseClass(): ResponseConstructor<any> {
throw new Error("Must define static response property");
}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ianardee
force-pushed
the
rag-search
branch
2 times, most recently
from
August 19, 2026 15:49
45f047d to
b27f937
Compare
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.
Description
Types of changes