Skip to content

Conversation

@yashwantbezawada
Copy link

@yashwantbezawada yashwantbezawada commented Nov 6, 2025

Changes being requested

Fixes #2717 - poll() methods in vector_stores now pass parameters correctly

The poll() methods in both Files and FileBatches were passing IDs as positional arguments instead of named parameters when calling retrieve(). This causes TypeError because retrieve() expects named parameters.

Fixed in 4 locations:

  • FileBatches.poll() (sync) - line 295
  • AsyncFileBatches.poll() (async) - line 632
  • Files.poll() (sync) - line 337
  • AsyncFiles.poll() (async) - line 745

Changed from:

batch_id,  # positional
vector_store_id,

To:

batch_id=batch_id,  # named parameter
vector_store_id=vector_store_id,

Additional context & links

Issue: #2717
Affected: All users calling poll() on vector store files or file batches
Impact: Method was failing with TypeError when trying to poll for completion status

Fixes openai#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,
@yashwantbezawada yashwantbezawada force-pushed the fix/vector-stores-poll-params-clean branch from b5b412a to a458faa Compare November 6, 2025 02:14
@karpetrosyan
Copy link
Collaborator

Can you provide a minimal reproducible example how we can get the error? The current implementation works for me, and it seems like the first argument can be positional, for the both classes

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