Skip to content

Support legacy SDK tag filter aliases#332

Open
abrookins wants to merge 1 commit into
mainfrom
fix-server-tag-filter-aliases
Open

Support legacy SDK tag filter aliases#332
abrookins wants to merge 1 commit into
mainfrom
fix-server-tag-filter-aliases

Conversation

@abrookins

@abrookins abrookins commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Accept existing SDK tag filter aliases server-side: in_ -> any, not_eq -> ne, and none -> not_in.
  • Add not_in filter support for tag and enum-backed filters.
  • Fix all tag filters to require every value instead of rendering the same OR expression as any.
  • Add regression coverage for direct filters and SearchRequest parsing of SDK-emitted payloads.

Related to #310, which adds server-shaped tag filter support to the Java client and surfaced the current Python/TypeScript compatibility gap.

Tests

  • pytest tests/test_filters.py
  • make pre-commit
  • make test (863 passed, 108 skipped)

Not run: make test-api (OPENAI_API_KEY is not set in this shell).


Note

Medium Risk
Changes how all filters query Redis (behavior fix that may narrow results for existing callers) and expands accepted search request shapes for compatibility.

Overview
Brings server-side tag/enum filters in line with legacy SDK field names and tightens how multi-value filters compile to Redis.

TagFilter / EnumFilter now accept SDK aliases at parse time: in_any, not_eqne, and (tags only) nonenot_in, with validation if an alias and its canonical field are both set. A new not_in option excludes any of the listed tag/enum values via a negated union expression.

all no longer renders the same OR expression as any; it now ANDs per-value tag constraints so “must have every value” matches intended semantics.

Tests cover alias mapping, not_in, the corrected all string form, and SearchRequest parsing when clients send SDK-shaped payloads (session_id, namespace, topics).

Reviewed by Cursor Bugbot for commit 2886b5f. Bugbot is set up for automated code reviews on this repo. Configure here.

@jit-ci

jit-ci Bot commented Jun 30, 2026

Copy link
Copy Markdown

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

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.

1 participant