Skip to content

fix: cherrypick v1 updates from main to fix mcp and sdk#1940

Open
edwinjosechittilappilly wants to merge 2 commits into
release-cpd-0.1from
fix-v1-issues
Open

fix: cherrypick v1 updates from main to fix mcp and sdk#1940
edwinjosechittilappilly wants to merge 2 commits into
release-cpd-0.1from
fix-v1-issues

Conversation

@edwinjosechittilappilly

Copy link
Copy Markdown
Collaborator

Cherry Pick from #1730
and #1666

edwinjosechittilappilly and others added 2 commits June 22, 2026 16:07
* Add filter_id support and v1 filter resolution

Add server-side resolution for filter_id and extend document deletion to accept a filter_id. Introduces api.v1._filter_resolution to normalize a filter_id into concrete filters/limits/score_thresholds and to strip wildcards. v1 endpoints (chat, search, documents) now accept filter_id and merge resolved values with inline overrides; documents DELETE can delete all filenames referenced by a filter_id (with wildcard/empty data_sources rejected to avoid mass deletion). SDK updates (Python and TypeScript) allow DocumentsClient.delete to accept either filename or filter_id (mutually exclusive), include additional response fields (filenames, filter_id, per_file), and preserve idempotent semantics for filename deletes while surfacing filter-not-found errors. Tests updated/added to cover filter_id behavior, inline overrides, streaming, and validation. Additional minor logging/validation and type updates included.

* style: ruff autofix (auto)

* Clarify /v1/documents DELETE description

Expand the DELETE /v1/documents component description to indicate it can delete single or multiple documents and requires exactly one of `filename` or `filter_id`. Also notes that wildcards are rejected for safety, improving API documentation and removing ambiguity about deletion semantics.

* style: ruff autofix (auto)

* fix lint

* style: ruff autofix (auto)

* Set auth context for API-key search requests

Ensure API-key authenticated searches set the auth context and pass the user's JWT to the search service so downstream tools can resolve the user. Adds import for set_auth_context, calls it when handling API-key requests (mirroring v1 chat), and passes user.jwt_token to search_service.search instead of None. Also cleans up an unused typing import.

* Exclude ingest route; expose /v1 GETs as tools

Clarify search component docs to document `filter_id` and inline `filters` (inline filters override per-field). Document that /v1/documents/ingest is intentionally not customized/exposed via MCP because multipart/form-data uploads are not supported by FastMCP's from_fastapi conversion; clients should use the HTTP API or SDK to ingest. Add a RouteMap to explicitly exclude POST /v1/documents/ingest and consolidate route maps to expose all /v1/ routes (including GET) as MCP tools, with a note explaining that GETs are exposed as tools to better support LLM agent workflows.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
(cherry picked from commit eda6aaf)
* missed filter_id fixes

* unit test

* clarify filter comments

* Use bracket notation for document body keys (#1734)

Change assignments to the request body to use bracket notation (body['filename'], body['filter_id']) instead of dot notation. This ensures the string keys are set explicitly on the Record<string, string> and avoids relying on declared property names.

* fix: Update integration.test.ts (#1737)

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
(cherry picked from commit db9ae7f)
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 58a52dc8-cdc6-4d44-ab23-0e5f6fbdd615

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-v1-issues

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@edwinjosechittilappilly edwinjosechittilappilly changed the base branch from release-cpd to release-cpd-0.1 June 22, 2026 21:10
@github-actions github-actions Bot added backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) tests bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jun 22, 2026
@github-actions github-actions Bot added the lgtm label Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) bug 🔴 Something isn't working. lgtm tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants