fix(vector_io): propagate search errors instead of returning empty results - #6093
Merged
cdoern merged 3 commits intoJun 15, 2026
Merged
Conversation
…sults The catch-all exception handler in openai_search_vector_store was silently swallowing backend errors and returning an empty result set with HTTP 200. This made it impossible for clients to distinguish between "no matching documents" and "the search failed", masking bugs like the milvus-lite 3.0 chunk_content KeyError. Closes ogx-ai#6092 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Derek Higgins <derekh@redhat.com>
derekhiggins
requested review from
bbrowning,
cdoern,
franciscojavierarceo,
leseb,
mattf,
raghotham and
skamenan7
as code owners
June 12, 2026 10:23
…e_with_chunks The test was passing a plain dict filter without a 'type' field, which was silently failing due to the catch-all exception handler returning empty results. The assertion loop never ran, so it appeared to pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Derek Higgins <derekh@redhat.com>
cdoern
approved these changes
Jun 12, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jun 12, 2026
Collaborator
|
@Mergifyio backport release-1.1.x |
Contributor
✅ Backports have been createdDetails
|
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jun 12, 2026
mattf
approved these changes
Jun 13, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jun 13, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jun 14, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jun 15, 2026
Qdrant collections are created lazily on first insert, so searching a vector store that has never had chunks added raises a 404. Handle this by checking collection existence and returning empty results instead. Co-Authored-By: Charlie Doern <cdoern@redhat.com> Signed-off-by: Derek Higgins <derekh@redhat.com>
derekhiggins
force-pushed
the
fix/surface-vector-store-search-errors
branch
from
June 15, 2026 14:43
757ec61 to
3879640
Compare
cdoern
enabled auto-merge
June 15, 2026 14:44
cdoern
added a commit
that referenced
this pull request
Jun 15, 2026
…sults (backport #6093) (#6117) ## Summary - The catch-all `except Exception` in `openai_search_vector_store` was silently swallowing backend errors and returning empty results with HTTP 200 - Clients had no way to distinguish "no matching documents" from "the search failed" - This masked bugs like the milvus-lite 3.0 `chunk_content` KeyError (#6089), where file_search appeared to work but retrieval silently returned nothing - Now re-raises the exception so it surfaces as a 500 to the client - Also fixes `test_openai_vector_store_with_chunks` which was passing `filters={"topic": "ai"}` (the old shorthand format) instead of the typed format `{"type": "eq", "key": "topic", "value": "ai"}` required since #4471. The error was silently swallowed, and the assertion loop over empty results never executed, so the test appeared to pass. Closes #6092 ## Test plan - Added unit test `test_search_vector_store_propagates_backend_errors` that verifies a `KeyError` from the backend propagates to the caller - Fixed `test_openai_vector_store_with_chunks` filter format so it actually exercises the filter path - Reproduced locally with milvus-lite 3.0: before the fix, search returns 200 with empty results; after, returns 500<hr>This is an automatic backport of pull request #6093 done by [Mergify](https://mergify.com). Signed-off-by: Derek Higgins <derekh@redhat.com> Co-authored-by: Derek Higgins <derekh@redhat.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Charlie Doern <cdoern@redhat.com>
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.
Summary
except Exceptioninopenai_search_vector_storewas silently swallowing backend errors and returning empty results with HTTP 200chunk_contentKeyError (feat(benchmarking): add Bayesian model fitting and CI workflow #6089), where file_search appeared to work but retrieval silently returned nothingtest_openai_vector_store_with_chunkswhich was passingfilters={"topic": "ai"}(the old shorthand format) instead of the typed format{"type": "eq", "key": "topic", "value": "ai"}required since feat: Enable Filters in OpenAI Search API #4471. The error was silently swallowed, and the assertion loop over empty results never executed, so the test appeared to pass.Closes #6092
Test plan
test_search_vector_store_propagates_backend_errorsthat verifies aKeyErrorfrom the backend propagates to the callertest_openai_vector_store_with_chunksfilter format so it actually exercises the filter path