Skip to content

fix(vector_io): propagate search errors instead of returning empty results#6093

Open
derekhiggins wants to merge 2 commits into
ogx-ai:mainfrom
derekhiggins:fix/surface-vector-store-search-errors
Open

fix(vector_io): propagate search errors instead of returning empty results#6093
derekhiggins wants to merge 2 commits into
ogx-ai:mainfrom
derekhiggins:fix/surface-vector-store-search-errors

Conversation

@derekhiggins

@derekhiggins derekhiggins commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

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 (feat(benchmarking): add Bayesian model fitting and CI workflow #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 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

  • 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

…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>
…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 cdoern added this pull request to the merge queue Jun 12, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 12, 2026
@cdoern cdoern added this pull request to the merge queue Jun 12, 2026
@cdoern

cdoern commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

@Mergifyio backport release-1.1.x

@mergify

mergify Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

backport release-1.1.x

🟠 Waiting for conditions to match

Details
  • merged [📌 backport requirement]

@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 12, 2026
@mattf mattf added this pull request to the merge queue Jun 13, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 13, 2026
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.

Vector store search silently returns empty results on backend errors

3 participants