Skip to content

Add SDK support for owner and connector search filters#1869

Open
Uday-sidagana wants to merge 1 commit into
langflow-ai:mainfrom
Uday-sidagana:Jun-sdk-search-filters
Open

Add SDK support for owner and connector search filters#1869
Uday-sidagana wants to merge 1 commit into
langflow-ai:mainfrom
Uday-sidagana:Jun-sdk-search-filters

Conversation

@Uday-sidagana

@Uday-sidagana Uday-sidagana commented Jun 13, 2026

Copy link
Copy Markdown

Summary

Added SDK support for owner and connector type search filters.

What changed

  • Added owners to Python and TypeScript SearchFilters.
  • Added connector_types to Python and TypeScript SearchFilters.
  • Updated Python and TypeScript README examples.
  • Added SDK tests for the new filter fields.

Notes

  • This uses existing public API filter behavior.
  • No internal APIs were exposed.

Summary by CodeRabbit

  • New Features

    • Extended search filtering capabilities with new owners and connector_types filter options available in both Python and TypeScript SDKs.
  • Documentation

    • Updated code examples demonstrating how to use the new filter fields in search queries.
  • Tests

    • Added test coverage to validate the new filter functionality across SDKs.

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f4f54783-e086-4752-9b81-21007847bb7c

📥 Commits

Reviewing files that changed from the base of the PR and between bc0ec2d and 6709b66.

📒 Files selected for processing (8)
  • sdks/python/README.md
  • sdks/python/openrag_sdk/chat.py
  • sdks/python/openrag_sdk/models.py
  • sdks/python/openrag_sdk/search.py
  • sdks/python/tests/test_models.py
  • sdks/typescript/README.md
  • sdks/typescript/src/types.ts
  • sdks/typescript/tests/types.test.ts

Walkthrough

This PR extends the SearchFilters model in both Python and TypeScript SDKs to include two additional optional filter fields: owners and connector_types. The changes include schema updates, API documentation improvements, example refinements, and validation tests for both SDK implementations.

Changes

SearchFilters Filter Fields Extension

Layer / File(s) Summary
Python SDK SearchFilters Schema and API Documentation
sdks/python/openrag_sdk/models.py, sdks/python/openrag_sdk/chat.py, sdks/python/openrag_sdk/search.py, sdks/python/README.md
SearchFilters model adds owners: list[str] | None and connector_types: list[str] | None fields. Docstrings in ChatClient.create(), ChatClient.stream(), and SearchClient.query() are updated to document the new filter options. README example demonstrates combining multiple filter criteria. Import cleanup: AsyncIterator moved from typing to collections.abc, duplicate Literal import removed, and unused httpx import removed.
Python SDK SearchFilters Test Validation
sdks/python/tests/test_models.py
New test test_search_filters_include_owner_and_connector_filters verifies SearchFilters correctly serializes owners and connector_types alongside existing data_sources and document_types fields.
TypeScript SDK SearchFilters Type and Tests
sdks/typescript/src/types.ts, sdks/typescript/README.md, sdks/typescript/tests/types.test.ts
SearchFilters interface adds owners?: string[] and connector_types?: string[] optional fields. README example extends the filters object with the new fields. New test validates the type structure and field presence.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

enhancement, tests

Suggested reviewers

  • mfortman11
  • edwinjosechittilappilly
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately and concisely summarizes the primary change: adding support for owner and connector search filters across both Python and TypeScript SDKs.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant