The return value of the vector_stores.file_batches.poll method contains the ID of the VectorStore.
メンテナーはふだん 1 日以内に返信
@nightcityblade がすでに取り組んでいます。
2026年5月14日 から。
評価
調査の方向性
vector_stores.file_batches.poll メソッドから始め、この issue のサンプルコードで動作を再現します。返された VectorStoreFileBatch オブジェクトの id フィールドと object フィールドを batch_obj と比較します。poll の結果が一貫してファイルバッチを表し、期待される ID を返すことを回帰テストでカバーできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Confirm this is an issue with the Python library and not an underlying OpenAI API
- This is an issue with the Python library
Describe the bug
The expected result is that the file_batches object ID should be stored and returned.
To Reproduce
Run the sample code.
call poll method.
Code snippets
import openai
file_obj = None
vector_store_obj = None
try:
client = openai.OpenAI(
api_key=os.environ['OPENAI_API_KEY']
)
file_obj = client.files.create(file=('test_data.json', b'{"aa": "AA"}\n'), purpose='user_data')
vector_store_obj = client.vector_stores.create(name='test_vector_store')
batch_obj = client.vector_stores.file_batches.create(
vector_store_id=vector_store_obj.id,
file_ids=[file_obj.id]
)
print(f'type:[{type(batch_obj)}]')
print(batch_obj.model_dump_json(indent=2))
response = client.vector_stores.file_batches.poll(batch_id=batch_obj.id, vector_store_id=vector_store_obj.id)
print(f'type:[{type(response)}]')
print(response.model_dump_json(indent=2))
print("# The return value contains the vector_store id.")
print("# Shouldn't the return value of the file_batches.poll method be the batch_obj ID?")
print(f'# OpenAI version:[{openai.__version__}]')
finally:
if file_obj:
client.files.delete(file_id=file_obj.id)
if vector_store_obj:
client.vector_stores.delete(vector_store_id=vector_store_obj.id)
# Below are the execution results.
'''
type:[<class 'openai.types.vector_stores.vector_store_file_batch.VectorStoreFileBatch'>]
{
"id": "vsfb_ibj_6905db4e33dc81f4a789ad8df2b5c748",
"created_at": 1761991502,
"file_counts": {
"cancelled": 0,
"completed": 0,
"failed": 0,
"in_progress": 1,
"total": 1
},
"object": "vector_store.file_batch",
"status": "in_progress",
"vector_store_id": "vs_6905db4d53708191a75c5ef9979258fd"
}
type:[<class 'openai.types.vector_stores.vector_store_file_batch.VectorStoreFileBatch'>]
{
"id": "vs_6905db4d53708191a75c5ef9979258fd",
"created_at": 1761991501,
"file_counts": {
"cancelled": 0,
"completed": 1,
"failed": 0,
"in_progress": 0,
"total": 1
},
"object": "vector_store",
"status": "completed",
"vector_store_id": null,
"name": "test_vector_store",
"description": null,
"usage_bytes": 0,
"expires_after": null,
"expires_at": null,
"last_active_at": 1761991501,
"metadata": {}
}
# The return value contains the vector_store id.
# Shouldn't the return value of the file_batches.poll method be the batch_obj ID?
# OpenAI version:[1.109.1]
'''
OS
Ubuntu24.04
Python version
Python3.12.3
Library version
openai v1.109.1
- 主要言語
- Python
- スター
- 31.8k
- フォーク
- 7.3k
- 平均マージ
- 1日 1時間
- マージ済み PR(30日)
- 137
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openai/openai-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
openai/openai-python#4022 · コメント 19 件 ·
メンテナーはふだん 1 日以内に返信
-
fix(auth): SubjectTokenProviderError drops response and duplicates error message in workload identity providers対応中かも @mohmedmm が 10 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
openai/openai-python#4017 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Querystring drops explicit empty-string scalar values対応中かも @sylvesterkaczmarek が 33 日前に担当しました。 オープンsdk-breaking-change v4
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
openai/openai-python#3837 ·
メンテナーはふだん 1 日以内に返信
-
Define + export `ServiceTiers` string literal対応中かも @SparshGarg999 が 59 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
openai/openai-python#3556 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Empty OPENAI_BASE_URL prevents fallback to default API endpoint対応中かも @Sehastrajit-S が 26 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
openai/openai-python#2927 · コメント 6 件 ·
メンテナーはふだん 1 日以内に返信
openai/openai-python の issue をすべて見る
似ている issue
-
area: agents area: docs good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
openapi/gknowledge#23 ·
-
get() for StrEnum対応中かも @FeJo5952 が今日担当しました。 オープンgood first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
collective/icalendar#1921 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Improvement Python Spans
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
getsentry/sentry-python#7994 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
alphagov/notifications-api#5004 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
equinor/radix-flux#3922 ·
メンテナーはふだん 1 日以内に返信