From a458faae38e41ba994578453d5b0c0f59a85659f Mon Sep 17 00:00:00 2001 From: Yashwant Bezawada Date: Wed, 5 Nov 2025 18:49:21 -0600 Subject: [PATCH] Fix: Correct parameter passing in vector_stores poll() methods Fixes #2717 The poll() methods in both Files and FileBatches were passing IDs as positional arguments instead of named parameters when calling retrieve(). This causes TypeError when retrieve() tries to match parameters, since the method signature expects named parameters. Fixed in 4 locations: - FileBatches.poll() (sync) - AsyncFileBatches.poll() (async) - Files.poll() (sync) - AsyncFiles.poll() (async) Changed from positional to named parameters: - batch_id, -> batch_id=batch_id, - file_id, -> file_id=file_id, --- src/openai/resources/vector_stores/file_batches.py | 4 ++-- src/openai/resources/vector_stores/files.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openai/resources/vector_stores/file_batches.py b/src/openai/resources/vector_stores/file_batches.py index 0f989821de..f94318f775 100644 --- a/src/openai/resources/vector_stores/file_batches.py +++ b/src/openai/resources/vector_stores/file_batches.py @@ -295,7 +295,7 @@ def poll( while True: response = self.with_raw_response.retrieve( - batch_id, + batch_id=batch_id, vector_store_id=vector_store_id, extra_headers=headers, ) @@ -632,7 +632,7 @@ async def poll( while True: response = await self.with_raw_response.retrieve( - batch_id, + batch_id=batch_id, vector_store_id=vector_store_id, extra_headers=headers, ) diff --git a/src/openai/resources/vector_stores/files.py b/src/openai/resources/vector_stores/files.py index d2eb4e16ed..dac65a5b85 100644 --- a/src/openai/resources/vector_stores/files.py +++ b/src/openai/resources/vector_stores/files.py @@ -337,7 +337,7 @@ def poll( while True: response = self.with_raw_response.retrieve( - file_id, + file_id=file_id, vector_store_id=vector_store_id, extra_headers=headers, ) @@ -745,7 +745,7 @@ async def poll( while True: response = await self.with_raw_response.retrieve( - file_id, + file_id=file_id, vector_store_id=vector_store_id, extra_headers=headers, )