-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working