API assistant Error on deleting file from vector store

Description: I successfully integrated the OpenAI Beta Assistant API into my Python application. However, I encountered an issue with file deletion from a vector store.

Problem: When I use the API to delete a file from a vector store, the operation returns a success message. However, when I subsequently retrieve all files from the same vector store, the deleted file is still present in the list.

Steps Taken:

  1. Successfully integrated the OpenAI API into my Python application.
  2. Used the API endpoint for deleting a file from a specific vector store.
  3. Received a success response indicating the file was deleted.
  4. Called the API to retrieve all files from the same vector store and found that the deleted file still appears in the list of files.

The endpoint in py to delete file from vector store

from openai import AsyncOpenAI
client = AsyncOpenAI(api_key=settings.OPENAI_API_KEY)

@chatbot_router.delete("/del-file-from-vs", response_model=Response)
async def delete_file_from_vector_store(
    vector_store_id: str,
    file_id: str,
        response = await client.beta.vector_stores.files.delete(
        return Response(payload=response.model_dump(), message="File successfully deleted from VS")
    except Exception as e:
        raise CustomExceptionCase(
            detail=f"An error occurred while deleting a delete_file_from_vector_store: {e}",