Files
e26ed3a97b fix(models): doctor probes per-task routes + probe token budget; honor file-plane chat_model (#3219, #3221, #3206)
Three verified backlog fixes:

- #3219: `gbrain models doctor` probed only the global chat + expansion
  models, so a per-task background route (models.dream.synthesize,
  models.think, facts.extraction_model, ...) configured to a distinct
  unreachable provider still reported green. New resolvePerTaskProbePlan
  resolves every PER_TASK_KEYS route the same way buildReport does, dedups
  against already-probed models and across routes, and probes each distinct
  resolved model once with the comma-joined route keys as the probe
  touchpoint for attribution.

- #3221 (takeover of open PR #3250): the doctor chat/expansion probe used
  maxTokens: 1, which falsely fails reasoning models (output budget spent on
  internal reasoning; some providers reject sub-minimum caps outright).
  Probe budget raised to a shared PROBE_MAX_OUTPUT_TOKENS constant, widened
  above any configured extended-thinking budget, and a length-exhausted
  empty completion is classified reachable with the limitation surfaced.
  Added on top: a catch-branch classification so the probe stays coherent
  with #3249's gateway-side contentless-completion rejection if that lands.

- #3206: reconfigureGatewayWithEngine passed the file-plane chat_model /
  expansion_model as resolveModel's bottom-rung `fallback`, so
  TIER_DEFAULTS silently replaced explicit user config on every
  engine-backed startup (and every chat-gated feature reported unavailable
  on non-Anthropic brains, with no error). New `userFallback` slot ranks
  explicit user config above the tier default while env/config-key
  overrides still win. The silent-zero half is also fixed: the facts
  extraction and classifier gates now check availability of the model the
  call will actually use, not the global chat default.

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