Skip to content

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

Merged
cdoern merged 1 commit into
release-1.1.xfrom
mergify/bp/release-1.1.x/pr-6093
Jun 15, 2026
Merged

fix(vector_io): propagate search errors instead of returning empty results (backport #6093)#6117
cdoern merged 1 commit into
release-1.1.xfrom
mergify/bp/release-1.1.x/pr-6093

Conversation

@mergify

@mergify mergify Bot commented Jun 15, 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
    This is an automatic backport of pull request fix(vector_io): propagate search errors instead of returning empty results #6093 done by Mergify.

…sults (#6093)

## 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

---------

Signed-off-by: Derek Higgins <derekh@redhat.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Charlie Doern <cdoern@redhat.com>
(cherry picked from commit 6acf940)
@github-actions

Copy link
Copy Markdown
Contributor

Recording workflow completed

Providers: ollama, ollama-reasoning

Recordings have been generated and will be committed automatically by the companion workflow.

View workflow run

@cdoern cdoern merged commit 6ff7922 into release-1.1.x Jun 15, 2026
49 checks passed
@cdoern cdoern deleted the mergify/bp/release-1.1.x/pr-6093 branch June 15, 2026 15:10
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.

2 participants