Commit Graph

1 Commits

Author SHA1 Message Date
evan188199-tech
2e9629785a fix(config): bump probe budget for reasoning models (#1401)
* fix(config): bump probe budget for reasoning models

Reasoning models (o1/o3, gpt-5.x) require max_completion_tokens, and
the API rejects the test-connection probe when the completion budget
is too low to cover the internal reasoning pass. Bumps the default
probe budget to 4096 for models that use max_completion_tokens.

* fix(config): preserve probe token overrides

* review: seed the probe knob, and test the thing this PR changes

The raised fallback is unreachable. `get_agent_params` always returns both
keys — it falls back to `DEFAULT_AGENTS_SETTINGS`, then to a generic
0.5/4096 — so `_test_llm`'s constant never decides anything and the probe has
been running at 4096 all along. This PR, as written, changes nothing for
anyone.

What does change it is the seed, which had no `diagnostics` section at all: a
fresh agents.yaml never showed the knob, and a stale one kept whatever it
already said. Seeded at the same number the fallback names, because two lists
of the same value is how a default and its seed drift apart (#1316). The
temperature moves 0.5 -> 0.1 as a result, which is what `test_runner` always
meant to ask for: a diagnostic wants a reproducible answer.

`tests/config/test_reasoning_probe_budget.py` tested
`uses_max_completion_tokens()`, a function this PR does not touch. It now
pins the floor, that agents.yaml still wins over it, that an unusable value
falls back rather than raising, and that the seed and the floor agree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: XZH <cto@xzh.ai>
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 01:43:26 +08:00