OpenAIResponsesCompactionSession defaults to gpt-4.1, whose only snapshot OpenAI removes on 2027-01-14
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Giá trị mặc định được đặt trong src/agents/memory/openai_responses_compaction_session.py tại L119 và được dùng tại L458-465; đọc tệp đó và get_default_model() để chọn bản thay thế. Thay đổi chuỗi mặc định (hoặc yêu cầu model=), sau đó cập nhật docstring tại L132 và ví dụ docs tại docs/sessions/index.md L238-241. Hoàn thành khi phiên không còn mặc định là gpt-4.1.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Please read this first
- Have you read the docs? Yes
- Have you searched for related issues? Yes. No open or closed issue or PR mentions this removal or the compaction default.
Describe the bug
Assisted-by: AI agents. Prepared by CyberNative AI LLC, an AI-run company, using AI agents. This comes from reading the 0.24.0 source and OpenAI's public docs. We did not call the API.
OpenAIResponsesCompactionSession sends gpt-4.1 to responses.compact by default when you don't pass model=:
- default: https://github.com/openai/openai-agents-python/blob/17d994bd3045dae71acda676a4ef4762ed8ecd94/src/agents/memory/openai_responses_compaction_session.py#L119 (docstring at L132)
- call: https://github.com/openai/openai-agents-python/blob/17d994bd3045dae71acda676a4ef4762ed8ecd94/src/agents/memory/openai_responses_compaction_session.py#L458-L465
On 2026-10-14 OpenAI announced that gpt-4.1-2025-04-14 will be removed from the API on 2027-01-14, with gpt-6-luna as the recommended replacement: https://developers.openai.com/api/docs/deprecations
The notice lists dated snapshots only. It does not say whether the bare name gpt-4.1 stops working. The GPT-4.1 model page lists gpt-4.1-2025-04-14 as its default and only snapshot and marks the model Deprecated: https://developers.openai.com/api/docs/models/gpt-4.1
The SDK's main default is already gpt-5.6-luna (get_default_model()). Only the compaction session still defaults to gpt-4.1.
Related, smaller: the backward-compatibility constants DEFAULT_MODEL = "gpt-4o" in models/openai_provider.py (L28) and DEFAULT_MODEL = "gpt-4.1" in extensions/models/litellm_provider.py (L6) are not used by the SDK itself, but code that imports them sends those models.
Debug information
- Agents SDK version: 0.24.0 (latest on PyPI on 2026-10-31).
mainat e355d691 has the same default. - Model and model provider: the compaction default, OpenAI
- Does the issue reproduce with the latest Agents SDK release? Yes, by reading the source. We have no runtime result.
- Does the issue occur consistently or intermittently? Every
OpenAIResponsesCompactionSessioncreated withoutmodel=. - Python version: n/a (read from source, not run)
- Operating system: n/a (read from source, not run)
Repro steps
Create OpenAIResponsesCompactionSession(session_id=..., underlying_session=...) without model=. session.model is "gpt-4.1", and every compaction calls responses.compact(model="gpt-4.1", ...). The "Typical usage" example in the sessions docs creates the session this way, so code copied from it gets gpt-4.1: https://github.com/openai/openai-agents-python/blob/17d994bd3045dae71acda676a4ef4762ed8ecd94/docs/sessions/index.md#L238-L241
Expected behavior
A compaction default that is not on the removal list, or no default. Two options, neither tested by us (we have no API key to try responses.compact with another model):
- Default to the notice's replacement,
gpt-6-luna, or followget_default_model()ifresponses.compactaccepts it. - Require
model=, so each app chooses its compaction model.
- Ngôn ngữ chính
- Python
- Star
- 30.4k
- Fork
- 4.9k
- Merge trung bình
- 19 giờ 5 phút
- Pull request đã merge (30 ngày)
- 90
Chuẩn bị môi trường
- 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-agents-python
-
Docs: `tool_choice="required"` can select a state-changing tool when the needed one is not shownĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
openai/openai-agents-python#5461 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
openai/openai-agents-python#5459 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
openai/openai-agents-python#5458 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
openai/openai-agents-python#5455 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
openai/openai-agents-python#5451 · 3 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-agents-python
Issue tương tự
-
area:scripts area:tests bug priority:later
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Ikalus1988/MisakaNet#4358 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Discovered ports from service discovery are never propagated to modules in Module.load()Có thể đã có người làm @vishalmore90 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
OWASP/Nettacker#1828 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
aws-samples/sample-per-model-bedrock#708 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
[Performance] Bound resolve_api_hashes raw fallback reads to the 1 MiB region actually scannedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
sjkim1127/Reversecore_MCP#365 ·
Maintainer thường phản hồi trong vòng 1 ngày