Skip to content

Commit ebdb0f2

Browse files
authored
fix: add GPT-5.5 aliases to sandbox compaction (#3039)
### Summary Adds GPT-5.5 snapshot and pro aliases to the sandbox compaction model context-window map so compaction threshold calculation recognizes them as 1,047,576-token models. ### Test plan - `uv run ruff check src/agents/sandbox/capabilities/compaction.py tests/sandbox/test_compaction.py` - `uv run pytest tests/sandbox/test_compaction.py` - Verified `CompactionModelInfo.for_model()` locally for `gpt-5.5-2026-04-23`, `gpt-5.5-pro`, and `gpt-5.5-pro-2026-04-23` - Verified the model IDs exist via the OpenAI Models API; also ran a live Responses API smoke with `gpt-5.5-2026-04-23` ### Issue number N/A ### Checks - [x] I've added new tests (if relevant) - [ ] I've added/updated the relevant documentation - [ ] I've run `make lint` and `make format` - [x] I've made sure tests pass
1 parent b3688db commit ebdb0f2

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/agents/sandbox/capabilities/compaction.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ def _model_context_windows(models: tuple[str, ...], context_window: int) -> dict
3030
"gpt-5.4-pro",
3131
"gpt-5.4-pro-2026-03-05",
3232
"gpt-5.5",
33+
"gpt-5.5-2026-04-23",
34+
"gpt-5.5-pro",
35+
"gpt-5.5-pro-2026-04-23",
3336
"gpt-4.1",
3437
"gpt-4.1-2025-04-14",
3538
"gpt-4.1-mini",

tests/sandbox/test_compaction.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
("gpt-5.4", 1_047_576),
1010
("gpt-5.4-pro", 1_047_576),
1111
("gpt-5.5", 1_047_576),
12+
("gpt-5.5-2026-04-23", 1_047_576),
13+
("gpt-5.5-pro", 1_047_576),
14+
("gpt-5.5-pro-2026-04-23", 1_047_576),
1215
("gpt-5.3-codex", 400_000),
1316
("gpt-5.4-mini", 400_000),
1417
("gpt-4.1", 1_047_576),

0 commit comments

Comments
 (0)