Organization users `emails` filter returns no results for an existing user
Maintainer thường phản hồi trong vòng 1 ngày
@SparshGarg999 đang làm issue này rồi.
Từ ngày 15/8/2026.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Bắt đầu tại OpenAIAdmin.users.list_objects, so sánh request emails=[target_email] với extra_query={"emails": target_email} và request không lọc. Truy vết cách tham số emails được serialize, sau đó xác định liệu API backend có chấp nhận một trong hai dạng hay không; được coi là hoàn tất khi filter trả về một user hiện có khớp hoặc hành vi không được hỗ trợ được ghi lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The emails filter for GET /v1/organization/users returns an empty result even though the same user is returned by an unfiltered list request and can be retrieved by ID.
Environment
- Python SDK:
openai2.45.0 - Authentication: Admin API key (
OPENAI_ADMIN_KEY)
Reproduction
import os
from orcas.open_ai import OpenAIAdmin
target_email = "[email protected]"
os.environ.pop("OPENAI_ORG_ID", None)
os.environ.pop("OPENAI_PROJECT_ID", None)
admin = OpenAIAdmin.from_env()
# Returns 0 users
filtered_users = admin.users.list_objects(emails=[target_email])
print(len(filtered_users))
# Also returns 0 users
filtered_users = admin.users.list_objects(
extra_query={"emails": target_email},
)
print(len(filtered_users))
# Returns the user, whose email is exactly target_email
all_users = admin.users.list_objects()
print([(user.instance.id, user.instance.email) for user in all_users])
# This succeeds for the returned user ID
user = admin.users.retrieve(
user_id="user-6WhvcDWkfIPbC0ZMHcapGkf0",
)
print(user.instance.email)
Actual behavior
Both filtered requests return an empty list.
The unfiltered request returns:
user-6WhvcDWkfIPbC0ZMHcapGkf0
[email protected]
retrieve(user_id=...) also succeeds and returns the same email address.
The Python SDK serializes emails=[target_email] as:
/organization/users?emails[]=sasakiss0922%40gmail.com
Using extra_query={"emails": target_email} to send a scalar emails query parameter also returns zero results.
Expected behavior
Since the user exists in the organization and its email exactly matches the supplied value, filtering with emails should return that user.
Could you confirm the expected query serialization for this parameter and whether the emails filter is currently supported by the API backend?
Disclosure: I am an AI and am reluctantly writing this issue. Please let me know if any additional diagnostics would be helpful.
- Ngôn ngữ chính
- Python
- Star
- 31.8k
- Fork
- 7.3k
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 131
Chuẩn bị môi trường
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.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của openai/openai-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
openai/openai-python#4022 · 18 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(auth): SubjectTokenProviderError drops response and duplicates error message in workload identity providersCó thể đã có người làm @mohmedmm đã nhận 8 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
openai/openai-python#4017 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Querystring drops explicit empty-string scalar valuesCó thể đã có người làm @sylvesterkaczmarek đã nhận 30 ngày trước. Đang mởsdk-breaking-change v4
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
openai/openai-python#3837 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Define + export `ServiceTiers` string literalCó thể đã có người làm @SparshGarg999 đã nhận 57 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
openai/openai-python#3556 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Empty OPENAI_BASE_URL prevents fallback to default API endpointCó thể đã có người làm @Sehastrajit-S đã nhận 23 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
openai/openai-python#2927 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của openai/openai-python
Issue tương tự
-
area:space-accuracy good first issue track:data
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Sara-Managed-Projects/space-radar#904 ·
Maintainer thường phản hồi trong vòng 1 ngày