Skip to content

The agent that grows with you

fix(agent): extend the reasoning stale-timeout floor to gpt-6-astra and pin the gpt-5.6 family

teknium16a2452393f98
diff --git a/agent/reasoning_timeouts.py b/agent/reasoning_timeouts.py
index 3568e006dbd..4b03c9b2c89 100644
--- a/agent/reasoning_timeouts.py
+++ b/agent/reasoning_timeouts.py
@@ -25,8 +25,11 @@ _REASONING_STALE_TIMEOUT_FLOORS: dict[int, tuple[str, ...]] = {
"deepseek-r1", "deepseek-reasoner", "deepseek-flash", "deepseek-v4-flash", "deepseek-v4.1-flash", "deepseek-v4-pro",
# OpenAI o-series: each variant enumerated so bare ``o1`` cannot over-match ``olmo-1``.
"o1", "o1-mini", "o1-pro", "o1-preview", "o3", "o3-pro",
- # GPT-5.6 named reasoning variants (for example, -sol and -terra).
- "gpt-5.6",
+ # OpenAI named reasoning lines (gpt-5.6-sol/-terra/-luna, gpt-6-astra, their -pro/-900k
+ # variants): minutes-long thinking at xhigh/max/ultra; sub-10k-token requests sit below the
+ # Codex context-size floor, so this is their only protection. Anchored so gpt-5.5 and the
+ # gpt-4.x / gpt-5.1-chat lines keep the effort-tier defaults (#112909).
+ "gpt-5.6", "gpt-6",
# Mythos-class named models (claude-fable-5): 1M ctx + 128K output, a heavier thinking
# phase than the numbered line — otherwise the stale detector trips the circuit breaker.
"claude-fable",
diff --git a/tests/agent/test_reasoning_stale_timeout_floor.py b/tests/agent/test_reasoning_stale_timeout_floor.py
index 212a7de03f6..53be45558cf 100644
--- a/tests/agent/test_reasoning_stale_timeout_floor.py
+++ b/tests/agent/test_reasoning_stale_timeout_floor.py
@@ -74,9 +74,13 @@ import pytest
("openai/o3-pro", 600.0),
("openai/o3-mini", 300.0),
("openai/o4-mini", 300.0),
- # GPT-5.6 reasoning family; vendor prefixes and named variants inherit.
+ # OpenAI named reasoning lines (#103802); vendor prefixes and named/-pro/-900k variants
+ # inherit via the separator anchor.
("openai/gpt-5.6-sol", 600.0),
("gpt-5.6-terra", 600.0),
+ ("gpt-5.6-sol-900k", 600.0),
+ ("gpt-6-astra", 600.0),
+ ("gpt-6-astra-900k", 600.0),
# Anthropic Claude 4.x thinking variants.
("anthropic/claude-opus-4-6", 240.0),
("anthropic/claude-opus-4-20250514", 240.0),
@@ -183,6 +187,10 @@ def test_gpt_5_6_floor_reaches_non_stream_and_stream_resolvers(monkeypatch, tmp_
assert _cloud_stale_timeout(180.0, {"model": "gpt-5.6-sol", "input": "small"}) == 600.0
assert get_reasoning_stale_timeout_floor("vendor/my-gpt-5.6-sol") is None
assert get_reasoning_stale_timeout_floor("gpt-5.60-sol") is None
+ # Non-reasoning OpenAI chat line stays on the defaults (#103802 control case).
+ for chat_model in ("gpt-4.1", "gpt-4o", "gpt-5.1-chat-latest"):
+ assert get_reasoning_stale_timeout_floor(chat_model) is None
+ assert _cloud_stale_timeout(180.0, {"model": chat_model, "input": "small"}) == 180.0
monkeypatch.setattr(run_agent, "get_provider_stale_timeout", lambda *a, **k: 900.0)
assert agent._resolved_api_call_stale_timeout_base() == (900.0, False)