Skip to content

Conversation

@ehhuang
Copy link
Contributor

@ehhuang ehhuang commented Nov 4, 2025

What does this PR do?

Test Plan

OpenAI processes file attachments asynchronously. Don't mark files as
"completed" immediately after attachment. Instead:

  1. Return the status from OpenAI's API response when attaching files
  2. Override openai_retrieve_vector_store_file() to check actual status from OpenAI
    when status is "in_progress" and update the cached status
  3. Update file counts in vector store metadata when status changes

This allows clients to poll the file status and get accurate processing updates
instead of getting an incorrect "completed" status before OpenAI has finished.


Stack created with Sapling. Best reviewed with ReviewStack.

# What does this PR do?


## Test Plan
OpenAI processes file attachments asynchronously. Don't mark files as
"completed" immediately after attachment. Instead:

1. Return the status from OpenAI's API response when attaching files
2. Override openai_retrieve_vector_store_file() to check actual status from OpenAI
   when status is "in_progress" and update the cached status
3. Update file counts in vector store metadata when status changes

This allows clients to poll the file status and get accurate processing updates
instead of getting an incorrect "completed" status before OpenAI has finished.
@ehhuang ehhuang mentioned this pull request Nov 4, 2025
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants