Skip to content

Conversation

iBotPeaches
Copy link
Collaborator

@iBotPeaches iBotPeaches commented Aug 31, 2025

What:

  • Bug Fix
  • New Feature

Description:

It seems OpenAI documentation does not call out that you can have nested compound searches alongside comparison filters. This means instead of having a compound search that houses comparison filters (or just directly comparison). You can have compound filters that contain compound filters. Think a query that becomes something like AND (X OR Y).

The comparison is first a compound filter for outer (AND), the inner logic (OR) is a compound filter while the X and Y are comparisons.

PHPStan is not a fan of self recursion so I introduced an intermediate type so I could recurse entries. It works well with real tests that I increasingly made more robust with adaptions to test. I did ignore a PHPStan issue on toArray() as the union is expecting all child classes during serialization to array to contain them. We can revisit once we are on PHPStan v2.

Related:

fixes: #663

@iBotPeaches iBotPeaches added this to the v0.17.0 milestone Aug 31, 2025
@iBotPeaches iBotPeaches merged commit 78320df into main Sep 1, 2025
24 checks passed
@iBotPeaches iBotPeaches deleted the issue-663 branch September 2, 2025 15:33
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.

[Bug]: Undefined array key "key" (and "value") in FileSearchComparisonFilter.php
1 participant