Files
bb2a3d2359 fix(models): doctor chat probe token budget — stop falsely failing reasoning models (takeover of #3250, #3221)
The models-doctor reachability probe used maxTokens: 1, which falsely
fails reasoning models (they burn output budget on internal reasoning
before emitting text). PROBE_MAX_OUTPUT_TOKENS=64, widened above any
configured extended-thinking budget (getConfiguredThinkingBudget
mirrors chat()'s recipe-alias resolution; read-only, never throws).
A length-exhausted empty-text response counts as reachable with the
limitation surfaced in the probe message.

Repair over #3250: composes with the gateway's contentless-length
guard (#3217/#3249) — when chat() itself throws the
'output budget exhausted' AIConfigError before the probe sees a
ChatResult, probeModel's catch now recognizes it and reports
reachable-with-caveat (the throw proves transport + auth + model
routing); every other AIConfigError still classifies as a failure.

Co-authored-by: Masashi-Ono0611 <Masashi-Ono0611@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 11:00:40 -07:00
..