♻️ cleanup and uniformize RAG search implementation with other SDKs - #458
Merged
Conversation
sebastianMindee
requested review from
ianardee
and
a lite review from Copilot
September 1, 2026 09:19
There was a problem hiding this comment.
Pull request overview
This PR refactors and aligns the V2 “search” surface with other SDKs by moving CLI search commands onto the generic Client.search(BaseSearchParameters) entrypoint, and by adding a dedicated CLI subcommand for searching RAG documents. It also updates related parsing/search model classes and extends the Sphinx docs to cover the new search modules.
Changes:
- Add
search-rag-docsCLI subcommand and tests; wire it into the V2 CLI parser. - Uniformize model search CLI to use
client.search(ModelSearchParameters(...))instead ofclient.search_models(...). - Clean up/clarify search response/metadata/string rendering and add/adjust V2 docs sections.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/v2/test_cli.py | Registers and tests the new search-rag-docs CLI subcommand. |
| mindee/v2/search/rag_documents/rag_document_search_response.py | Tweaks RAG document search response formatting/docstrings. |
| mindee/v2/search/rag_documents/rag_document_search_parameters.py | Adds model_id validation and adjusts request parameter emission. |
| mindee/v2/search/models/model_search_response.py | Updates model search response docstrings/formatting. |
| mindee/v2/search/models/model_search_parameters.py | Makes request parameter emission skip falsy values. |
| mindee/v2/product/extraction/params/extraction_parameters.py | Fixes erroneous double assignments in request parameter building. |
| mindee/v2/parsing/search/search_response.py | Adjusts SearchResponse compatibility surface. |
| mindee/v2/parsing/search/search_models.py | Updates list string formatting (removes webhooks count line). |
| mindee/v2/parsing/search/search_model.py | Adds string helpers for search model formatting. |
| mindee/v2/parsing/search/pagination_metadata.py | Updates pagination metadata docstrings. |
| mindee/v2/parsing/search/model_webhook.py | Docstring clarification. |
| mindee/v2/parsing/search/base_search_response.py | Docstring clarification for body rendering. |
| mindee/v2/parsing/inference/rag_metadata.py | Adds missing field docstring. |
| mindee/v2/parsing/inference/inference_active_options.py | Refines option docstrings for clarity. |
| mindee/v2/commands/search_rag_documents_command.py | New CLI command implementation for RAG document search. |
| mindee/v2/commands/search_models_command.py | Uses client.search(ModelSearchParameters(...)) for uniform search handling. |
| mindee/v2/commands/cli_parser.py | Wires in search-rag-docs and refactors dispatch into _execute_command. |
| mindee/v2/commands/init.py | Exports SearchRagDocumentsCommand. |
| mindee/v2/client_options/base_search_parameters.py | Changes page/per_page serialization behavior for invalid values. |
| mindee/cli.py | Updates top-level CLI docstring to mention search-rag-docs. |
| docs/v2/search.rst | New V2 search documentation page. |
| docs/v2/parsing/search.rst | Documents Search RAG Document(s) parsing models. |
| docs/v2/mindee_http.rst | Removes response validation module section. |
| docs/v2/index.rst | Adds the new search docs page to the V2 index. |
| docs/v2/client_options.rst | Splits product vs search base parameter docs and updates references. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ianardee
requested changes
Sep 2, 2026
ianardee
approved these changes
Sep 3, 2026
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