Shell tool allowlist network policy broken
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず、issue に示されている allowlist の network_policy を使った shell tool で responses.create 経由の失敗を再現し、network policy を無効にした場合と比較します。この payload に対する Python ライブラリのリクエストパスを追跡し、報告された server_error と request ID を使って、クライアントのシリアライズの問題と API 側の失敗を切り分けます。allowlist を使用したリクエストが HTTP 500 を返さなくなれば完了です。
索引モデルが 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
I get this error when I add allowlist network policy with our production domains to an agent with a shell tool:
An error occurred while processing your request. You can retry your request, or contact us through our help center at [help.openai.com](http://help.openai.com/) if the error persists. Please include the request ID req_3b0917dca27342dda56901e1a1c05306 in your message.
It does not occur when network policy is disabled. The domains in allowed_domains are in Container network mode in the data controls in platform.openai.com. Another thing to note is that it was still working on Feb 26.
To Reproduce
- Add a domain (e.g. "google.com" as in the code snippet) to platform.openai.com > Data control > Hosted tools > Container network mode > allowlist
- Run the included code snippet
- Result:
Error code: 500 - {'error': {'message': 'An error occurred while processing your request. You can retry your request, or contact us through our help center at help.openai.com if the error persists. Please include the request ID req_XXXXX in your message.', 'type': 'server_error', 'param': None, 'code': 'server_error'}}
Code snippets
from openai import APIStatusError, OpenAI
client = OpenAI()
try:
response = client.responses.create(
model="gpt-5.2",
input="Use shell tool and run: curl google.com",
tools=[
{
"type": "shell",
"environment": {
"type": "container_auto",
"network_policy": {
"type": "allowlist",
"allowed_domains": ["google.com"],
},
},
}
],
)
print("response_id:", response.id)
print("status:", response.status)
print("output_text:", response.output_text)
except APIStatusError as e:
print("http_status:", e.status_code)
print("request_id:", e.request_id)
print("error:", e)
OS
Ubuntu 24.04
Python version
Python v3.13.3
Library version
openai v2.24.0
- 主要言語
- Python
- スター
- 31.8k
- フォーク
- 7.3k
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 131
環境構築
このプロジェクトの開発コンテナを、あなたの 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 が 8 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
openai/openai-python#4017 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Querystring drops explicit empty-string scalar values対応中かも @sylvesterkaczmarek が 31 日前に担当しました。 オープンsdk-breaking-change v4
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
openai/openai-python#3837 ·
メンテナーはふだん 1 日以内に返信
-
Define + export `ServiceTiers` string literal対応中かも @SparshGarg999 が 57 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
openai/openai-python#3556 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Empty OPENAI_BASE_URL prevents fallback to default API endpoint対応中かも @Sehastrajit-S が 23 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
openai/openai-python#2927 · コメント 6 件 ·
メンテナーはふだん 1 日以内に返信
openai/openai-python の issue をすべて見る
似ている issue
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
hatchet-dev/hatchet#5179 ·
メンテナーはふだん 1 日以内に返信
-
python-version
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
bug javascript P2-medium python release:v3.1
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
adrirubio/claude-deck#546 ·
メンテナーはふだん 1 日以内に返信