fix!: BREAKING CHANGE: vector_store: search API response fix (#4080)

# What does this PR do?
- search_query in the vector store search API should be a list,
according to https://github.com/openai/openai-openapi


## Test Plan
modified tests


---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with
[ReviewStack](https://reviewstack.dev/llamastack/llama-stack/pull/4080).
* #4086
* __->__ #4080
This commit is contained in:
ehhuang 2025-11-05 15:01:48 -08:00 committed by GitHub
parent 84a84ee85c
commit 9d5c34af27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 209 additions and 227 deletions

View file

@ -637,7 +637,7 @@ class OpenAIVectorStoreMixin(ABC):
break
return VectorStoreSearchResponsePage(
search_query=search_query,
search_query=query if isinstance(query, list) else [query],
data=data,
has_more=False, # For simplicity, we don't implement pagination here
next_page=None,
@ -647,7 +647,7 @@ class OpenAIVectorStoreMixin(ABC):
logger.error(f"Error searching vector store {vector_store_id}: {e}")
# Return empty results on error
return VectorStoreSearchResponsePage(
search_query=search_query,
search_query=query if isinstance(query, list) else [query],
data=[],
has_more=False,
next_page=None,