Vector_stores.files.list() should also return the file name

Yes. Store the file name yourself as a metadata attribute of the vector store file.

Demonstration that will run on your filename to upload:

from openai import OpenAI; cl = OpenAI()
filename = "vs_metadata_demo.py"
vs_id = cl.vector_stores.create(name="vstest").id

def upload_attach_poll(vs, file, suffix=""):
    file_id = cl.files.create(
        file=open(file, "rb"), purpose="user_data",
        expires_after={"anchor": "created_at", "seconds": 3600},
    ).id
    vs_file_id = cl.vector_stores.files.create(
        vector_store_id=vs,
        file_id=file_id, attributes={"name": file+suffix}
    ).id
    vs_file_status='in_progress'
    while vs_file_status == 'in_progress':
        vs_file_status = cl.vector_stores.files.retrieve(
            vector_store_id=vs, file_id=file_id,).status
    return file_id

file1_id = upload_attach_poll(vs_id, file=filename, suffix="")
file2_id = upload_attach_poll(vs_id, file=filename, suffix="--second")
print(f"-- retrieving vector store file listing, looking for metadata")
vs_files = cl.vector_stores.files.list(vector_store_id=vs_id)
for item in vs_files.data:
  print(item.model_dump())
  cl.files.delete(item.id)
cl.vector_stores.delete(vector_store_id=vs_id)

It uploads the file twice, creating two vector file store entries, each with a different metadata.

See the result, “attributes” with a “name” key created when uploading:

-- retrieving vector store file listing, looking for metadata
{'id': 'file-VjNoYtmw6zQPMaKC6kD2u', 'created_at': 1756819027, 'last_error': None, 'object': 'vector_store.file', 'status': 'completed', 'usage_bytes': 1095, 'vector_store_id': 'vs_68b6ee4fadce1d', 'attributes': {'name': 'vs_metadata_demo.py--second'}, 'chunking_strategy': {'static': {'chunk_overlap_tokens': 400, 'max_chunk_size_tokens': 800}, 'type': 'static'}}
{'id': 'file-Tfp8GaFpjhMkrGRFmYUU4', 'created_at': 1756819025, 'last_error': None, 'object': 'vector_store.file', 'status': 'completed', 'usage_bytes': 1095, 'vector_store_id': 'vs_68b6ee4fadce1d', 'attributes': {'name': 'vs_metadata_demo.py'}, 'chunking_strategy': {'static': {'chunk_overlap_tokens': 400, 'max_chunk_size_tokens': 800}, 'type': 'static'}}