fix(agents): harden model fallback failover paths

This commit is contained in:
Peter Steinberger
2026-02-25 03:46:34 +00:00
parent 480cc4b85c
commit d2597d5ecf
10 changed files with 187 additions and 11 deletions

View File

@@ -164,7 +164,9 @@ function resolveImageFallbackCandidates(params: {
const imageFallbacks = resolveAgentModelFallbackValues(params.cfg?.agents?.defaults?.imageModel);
for (const raw of imageFallbacks) {
addRaw(raw, true);
// Explicitly configured image fallbacks should remain reachable even when a
// model allowlist is present.
addRaw(raw, false);
}
return candidates;
@@ -235,7 +237,9 @@ function resolveFallbackCandidates(params: {
if (!resolved) {
continue;
}
addCandidate(resolved.ref, true);
// Fallbacks are explicit user intent; do not silently filter them by the
// model allowlist.
addCandidate(resolved.ref, false);
}
if (params.fallbacksOverride === undefined && primary?.provider && primary.model) {