feat(subagent): surface unset model-fallback on retryable failures + ARMORY_FLEET_MODEL_FALLBACK=auto (#58) - #70
Merged
Conversation
…ARMORY_FLEET_MODEL_FALLBACK=auto #58: a retryable provider failure with neither a per-dispatch modelFallback nor the global default silently skipped auto-retry — the operator had no signal. Two changes, per the issue's rec: - Visibility: the tool appends 'no modelFallback configured - pass modelFallback or set ARMORY_FLEET_MODEL_FALLBACK' to a retryable failure's error, exactly when the missing fallback matters. - auto sentinel: ARMORY_FLEET_MODEL_FALLBACK=auto resolves a fallback from the runtime's configured+available snapshot per session — a different provider than the session model preferred, else a different id; unresolvable (single-model) stays off with a one-time warning. resolveAutoFallback is a pure helper (engine/auto-fallback.ts) + tests; wiring in index.ts init (verbatim values) + session_start (auto).
…ck set; non-retryable failure)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem (#58)
A retryable provider failure (stopReason 'error') with neither a per-dispatch
modelFallbacknor the globaldefaultModelFallbacksilently skipped auto-retry — the dispatch just failed and the operator had no signal that a safety feature was off.Changes (per the issue's rec: visibility first, auto as opt-in)
Visibility —
tools/subagent.ts: when a dispatch fails retryable and NO fallback is configured, the surfaced error now appends:(no modelFallback configured — pass modelFallback or set ARMORY_FLEET_MODEL_FALLBACK to enable one-shot auto-retry)…exactly when the missing fallback matters. Mutually exclusive with fix(subagent): surface primary error when fallback retry masks it + journal failure reason (#59) #69's composed primary+fallback error (a retry implies a fallback existed).
autosentinel —ARMORY_FLEET_MODEL_FALLBACK=autoresolves a fallback per session from the runtime's configured+available snapshot via a new pure helperresolveAutoFallback(engine/auto-fallback.ts):undefinedon single-model setups → auto-retry stays off + a one-time session warning says why.Wiring:
index.tsinit uses non-autoenv values verbatim (unchanged);session_startresolvesauto(needs the session model to differ from).Tests
test/auto-fallback.test.mts(5): different-provider preference, same-provider fallback, single-model → undefined, empty snapshot → undefined, never picks the session model itself.pnpm typecheckclean.Closes #58