Skip to content

✨ add RAG search API - #476

Open
ianardee wants to merge 8 commits into
mainfrom
rag-search
Open

✨ add RAG search API#476
ianardee wants to merge 8 commits into
mainfrom
rag-search

Conversation

@ianardee

Copy link
Copy Markdown
Collaborator

Description

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires a change to the official Guide documentation.

@ianardee
ianardee force-pushed the rag-search branch 14 times, most recently from 70431d2 to dce2e68 Compare August 18, 2026 15:06
@ianardee
ianardee marked this pull request as ready for review August 18, 2026 15:21
@ianardee
ianardee requested a lite review from Copilot August 18, 2026 15:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 BaseParametersBaseProductParameters and move product enqueue parameter serialization to MindeeApiV2.
  • Deprecate legacy SearchResponse in favor of the new ModelSearchResponse, 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.

Comment thread tests/v2/search/modelSearch.spec.ts
Comment thread src/v2/parsing/search/searchRagDocuments.ts Outdated
Comment thread src/v2/parsing/search/searchModels.ts Outdated
Comment thread src/v2/parsing/search/searchResponse.ts
Comment thread src/v2/search/baseSearch.ts
ianardee and others added 4 commits August 18, 2026 17:32
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

2 participants