fix(background-agent): skip unavailable fallback models#3402
Open
kywoo26 wants to merge 2 commits intocode-yeongyu:devfrom
Open
fix(background-agent): skip unavailable fallback models#3402kywoo26 wants to merge 2 commits intocode-yeongyu:devfrom
kywoo26 wants to merge 2 commits intocode-yeongyu:devfrom
Conversation
Contributor
|
All contributors have signed the CLA. Thank you! ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
1 issue found across 3 files
Confidence score: 3/5
- There is a concrete behavior risk in
src/features/background-agent/fallback-retry-handler.ts: availability resolution can ignore the connected preferred provider path, which may skip valid fallback providers when cache data is present. - Given the issue is medium severity (6/10) with high confidence (8/10) and affects fallback selection logic, this introduces a real chance of user-facing reliability regressions.
- Pay close attention to
src/features/background-agent/fallback-retry-handler.ts- ensure preferred-provider and cached-availability paths are reconciled so valid fallbacks are not skipped.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/features/background-agent/fallback-retry-handler.ts">
<violation number="1" location="src/features/background-agent/fallback-retry-handler.ts:90">
P2: Availability resolution ignores the connected preferred provider path, so valid fallbacks can be skipped when cache data exists.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
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
Changes
model-fallbackcandidate selection to prefer runtime-available fallback modelsTesting
bun test src/features/background-agent/fallback-retry-handler.test.ts src/features/background-agent/manager.polling.test.ts src/features/background-agent/session-idle-event-handler.test.ts bun run typecheck bun run buildManual validation:
Related Issues
Closes #3400
Summary by cubic
Skip fallback models that aren’t available at runtime to avoid wasted background-agent retries. Use the provider-model cache to pick the first available fallback and prefer the connected preferred provider when possible; fall back to the old provider-based logic when no cache is present.
Written for commit 77d86f2. Summary will update on new commits.