Log which primary was benched (and why) on a proactive fallback swap#1279
Merged
Conversation
The toolkit's createRun logged only the fallback it routed to
('Using fallback provider: Codex CLI (source: system)'), so a benched
primary looked like an unexplained switch — confusing because the
provider's 'enabled' toggle is independent of its runtime availability.
Name the skipped primary, its unavailability reason, and the recovery ETA
instead.
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.
Summary
Follow-up to #1278. When
createRunfinds the requested provider benched (runtime-unavailable) and proactively routes to a fallback, the log printed only the fallback —⚡ Using fallback provider: Codex CLI (source: system)— which reads as an unexplained switch. It's confusing precisely because a provider'senabledtoggle (what the AI Providers UI shows) is independent of its runtime availability state, which the bench sets after a failure like aMODEL_NOT_FOUND.The line now names the skipped primary, its reason, and the recovery ETA:
Uses
providerStatusService.getStatus()/getTimeUntilRecovery()— already called two lines below on the no-fallback error path — so no new dependencies. The CoS agent fallback path (agentProviderResolution.js) already logsprimaryProviderin its structured context.Test plan
node --checkpasses;providerStatusandagentProviderResolutionsuites green (46 tests). ThecreateRunproactive-swap path has no existing test harness and building one for a log string would be disproportionate; the helpers used are already exercised on the adjacent no-fallback error path.