Skip to content

Conversation

@evsong
Copy link

@evsong evsong commented Jan 31, 2026

Summary

  • Fix category model configurations being ignored when connected-providers.json cache doesn't exist
  • Use first fallback chain entry instead of skipping to systemDefaultModel

Problem

When connected-providers.json cache is missing (first run or cache cleared), resolveModelWithFallback() was skipping the entire fallback chain and falling through to systemDefaultModel. This caused all category-specific model configurations (quick, visual-engineering, ultrabrain, etc.) to be ignored.

Related Issues: #1264, #1295

Solution

When cache is null, use the first entry in the fallback chain instead of skipping:

if (connectedSet === null) {
  const firstEntry = fallbackChain[0]
  if (firstEntry && firstEntry.providers.length > 0) {
    const model = `${firstEntry.providers[0]}/${firstEntry.model}`
    return { model, source: "provider-fallback", variant: firstEntry.variant }
  }
}

Testing

  • Updated 2 existing tests to reflect new behavior
  • All 46 tests pass

Summary by cubic

Fixes category-specific model selection when connected-providers.json is missing by using the first fallback chain entry instead of the system default. Ensures categories like quick, visual-engineering, and ultrabrain use their intended models on first run or after cache clear.

  • Bug Fixes
    • When no connected-providers cache exists, resolveModelWithFallback now picks the first fallback entry (preserving variant) and marks source as provider-fallback.
    • Updated tests to reflect the new behavior.

Written for commit 7ef706f. Summary will update on new commits.

When connected-providers.json cache doesn't exist (first run or cache cleared),
the model resolver was skipping the entire fallback chain and falling through
to systemDefaultModel. This caused all category-specific model configurations
to be ignored.

Fix: Use the first entry in fallback chain instead of skipping to systemDefault.
This ensures category models (quick, visual-engineering, etc.) work correctly
even without the cache.

Fixes code-yeongyu#1264
@github-actions
Copy link
Contributor

Thank you for your contribution! Before we can merge this PR, we need you to sign our Contributor License Agreement (CLA).

To sign the CLA, please comment on this PR with:

I have read the CLA Document and I hereby sign the CLA

This is a one-time requirement. Once signed, all your future contributions will be automatically accepted.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant