Skip to content

Fall back from an unusable selected inference provider - #860

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-7545-fall-back-to-the-next-resolvable-provider-when-the-selected
Sep 10, 2026
Merged

Fall back from an unusable selected inference provider#860
TheGreatAxios merged 2 commits into
mainfrom
cl-7545-fall-back-to-the-next-resolvable-provider-when-the-selected

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • When the selected default or project-local provider is missing or incomplete, resolution uses the next fully resolvable catalog provider
  • Explicit --provider still fails closed
  • Empty local.model is treated as unset so a healthy pick is not abandoned

Verification

  • bun run typecheck, bun run build, and bun run test pass
  • bun test ./src/settings.test.ts passes

Fixes CL-7545

A missing or incomplete default or project-local pick used to treat
the session as unconfigured even when another provider could run.
Explicit --provider still fails closed.
@linear-code

linear-code Bot commented Sep 10, 2026

Copy link
Copy Markdown

CL-7545

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Primary · Approve

Session-only fallback in resolveProvider. Unusable default/local walks recents then remaining catalog keys. --provider stays fail-closed. Empty local.model is unset. Malformed baseURL still fail-closes at normalize (counsel/greybeard: do not treat as unusable). Merge as it stands.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Critic · Comment

No blocking findings on the contracted behavior: CLI fail-closed, no persist, local.model does not follow siblings, throw strings unchanged.

Should-fix that landed: empty local.model no longer abandons a healthy original pick.

Waived: malformed nonempty baseURL still throws from normalize instead of walking siblings — specified, not a miss.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Greybeard · Comment

Approve. resolveProvider owns session-only recovery. Remaining catalog keys run only after a failed original pick, not when nothing was selected. local.model stays paired with the original provider. Do not persist the fallback as the new default.

@TheGreatAxios
TheGreatAxios merged commit 8685cbd into main Sep 10, 2026
5 checks passed
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