OpenAIResponsesCompactionSession defaults to gpt-4.1, whose only snapshot OpenAI removes on 2027-01-14
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
Línea de trabajo
El valor predeterminado se establece en src/agents/memory/openai_responses_compaction_session.py en L119 y se usa en L458-465; lee ese archivo y get_default_model() para elegir un reemplazo. Cambia la cadena predeterminada (o requiere model=), luego actualiza el docstring en L132 y el ejemplo de la documentación en docs/sessions/index.md L238-241. Hecho cuando la sesión ya no usa gpt-4.1 por defecto.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 30.4k
- Forks
- 4.9k
- Merge medio
- 16 h 32 min
- PR fusionados (30 d)
- 85
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de openai/openai-agents-python
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
openai/openai-agents-python#5477 ·
Los mantenedores suelen responder en 1 día
-
Voice: default sentence splitter never splits Chinese/Japanese, so TTS waits for the whole replyAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
openai/openai-agents-python#5475 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
openai/openai-agents-python#5472 ·
Los mantenedores suelen responder en 1 día
-
OpenAIConversationsSession and OpenAIResponsesCompactionSession ignore set_default_openai_key()Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
openai/openai-agents-python#5471 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
openai/openai-agents-python#5468 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de openai/openai-agents-python
Issues similares
-
cost:cheap practicality:seen-in-the-wild severity:medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
fairagro/m4.2_advanced_middleware_api#620 ·
Los mantenedores suelen responder en 1 día
-
area:security effort:S priority:P2 provider:local-libvirt status:ready type:docs
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
randomparity/kdive#3495 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
microsoft/markitdown#2820 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días