From 20c319795259f097101917d7304e63aeeeb21c5c Mon Sep 17 00:00:00 2001 From: Francisco Arceo Date: Tue, 22 Jul 2025 13:31:31 -0400 Subject: [PATCH] chore: Making name optional in openai_create_vector_store (#2858) # What does this PR do? chore: Making name optional in openai_create_vector_store # Closes https://github.com/meta-llama/llama-stack/issues/2706 ## Test Plan CI and unit tests Signed-off-by: Francisco Javier Arceo --- docs/_static/llama-stack-spec.html | 3 --- docs/_static/llama-stack-spec.yaml | 2 -- llama_stack/apis/vector_io/vector_io.py | 2 +- .../providers/utils/memory/openai_vector_store_mixin.py | 2 +- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/docs/_static/llama-stack-spec.html b/docs/_static/llama-stack-spec.html index d7801ba1c..38e53a438 100644 --- a/docs/_static/llama-stack-spec.html +++ b/docs/_static/llama-stack-spec.html @@ -13596,9 +13596,6 @@ } }, "additionalProperties": false, - "required": [ - "name" - ], "title": "OpenaiCreateVectorStoreRequest" }, "VectorStoreFileCounts": { diff --git a/docs/_static/llama-stack-spec.yaml b/docs/_static/llama-stack-spec.yaml index be02e1e42..0df60ddf4 100644 --- a/docs/_static/llama-stack-spec.yaml +++ b/docs/_static/llama-stack-spec.yaml @@ -9497,8 +9497,6 @@ components: description: >- The ID of the provider to use for this vector store. additionalProperties: false - required: - - name title: OpenaiCreateVectorStoreRequest VectorStoreFileCounts: type: object diff --git a/llama_stack/apis/vector_io/vector_io.py b/llama_stack/apis/vector_io/vector_io.py index 618ac2a95..853c4656c 100644 --- a/llama_stack/apis/vector_io/vector_io.py +++ b/llama_stack/apis/vector_io/vector_io.py @@ -338,7 +338,7 @@ class VectorIO(Protocol): @webmethod(route="/openai/v1/vector_stores", method="POST") async def openai_create_vector_store( self, - name: str, + name: str | None = None, file_ids: list[str] | None = None, expires_after: dict[str, Any] | None = None, chunking_strategy: dict[str, Any] | None = None, diff --git a/llama_stack/providers/utils/memory/openai_vector_store_mixin.py b/llama_stack/providers/utils/memory/openai_vector_store_mixin.py index e5328bc59..c11de396b 100644 --- a/llama_stack/providers/utils/memory/openai_vector_store_mixin.py +++ b/llama_stack/providers/utils/memory/openai_vector_store_mixin.py @@ -161,7 +161,7 @@ class OpenAIVectorStoreMixin(ABC): async def openai_create_vector_store( self, - name: str, + name: str | None = None, file_ids: list[str] | None = None, expires_after: dict[str, Any] | None = None, chunking_strategy: dict[str, Any] | None = None,