Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Shell tool allowlist network policy broken

Đang mở
#2,920 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python, shell
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện lỗi thông qua responses.create với shell tool và network_policy allowlist được nêu trong issue, so sánh với trường hợp network policy bị vô hiệu hóa. Truy vết đường đi của request trong thư viện Python đối với payload này và sử dụng server_error cùng request ID được báo cáo để phân biệt lỗi serialization phía client với lỗi phía API. Hoàn tất khi request có allowlist không còn trả về HTTP 500.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug
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
  1. Add a domain (e.g. "google.com" as in the code snippet) to platform.openai.com > Data control > Hosted tools > Container network mode > allowlist
  2. Run the included code snippet
  3. 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

Ngôn ngữ chính
Python
Star
31.7k
Fork
6.8k
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
128

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của openai/openai-python

Tất cả issue của openai/openai-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.