fix(ai): refresh subscription models and harden OAuth flows - #2832
Merged
bobleer merged 2 commits intoSep 6, 2026
Conversation
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
Subscription model discovery could show an outdated fixed Antigravity list, hide Codex subscription-only models, mix OpenCode offerings, and prevent retries after failures. Fetch account-scoped catalogs, add explicit refresh and failure states, and fix OAuth expiry, polling, and Nous authentication across the five subscription providers.
Type and Areas
Type: bug fix
Areas: AI adapters, subscription OAuth, Web UI model settings, documentation and locales.
Motivation / Impact
fetchAvailableModelswith endpoint fallback and preserves current server model IDs instead of returning a static seven-model list. An old display name alone does not imply an outdated model, and published models are not assumed to be available to every OAuth account.supported_in_api: false, respects hidden entries, and reports catalog errors instead of silently using another CLI's local cache.slow_downbackoff.Compared against OpenCode
7c2199d84a5830f70a8250731a42ff958145b4d6and Hermes Agent245e48008fa814b3251f50755eb656bd9fb86cb1.Verification
cargo test -p openbitfun-ai-adapters --features subscription-auth --lib— 352 passed.pnpm --dir src/web-ui exec vitest run src/infrastructure/config/components/modelDiscoveryCoordinator.test.ts src/infrastructure/config/components/subscriptionLoginCoordinator.test.ts src/infrastructure/config/components/ModelSettingsPage.presentation.test.ts— 16 passed across 3 files.pnpm run fmt:rs,pnpm run check:core-boundaries,pnpm run i18n:audit— passed.pnpm run check:web— passed (canvas, Appearance/theme governance, and TypeScript); generated API types withpnpm --dir src/web-ui run gen:typesas build preparation.pnpm run lint:web— passed with 0 errors (11 existing warnings). Effect cleanup captures its coordinator instance; the 16 focused frontend tests also pass after this correction.git diff --check upstream/main...HEADandnode scripts/check-git-object-sizes.mjs --base upstream/main --head HEAD— passed after rebasing onto the latest upstream main.Reviewer Notes
AI-assisted; testing level: lightly tested end to end, with focused automated regression coverage. Tests use local HTTP mocks and synthetic credentials; no live subscription login or inference was performed. Real SSH workspaces, remote control, Peer Device Mode and Detached Dispatch were not exercised. Surface-switch invalidation and device polling are covered locally. No desktop build or authenticated UI screenshots were produced.
Manual verification: rebuild the desktop app, sign into each provider, refresh the model picker, verify offerings against that account, and send a short request. Repeat discovery after a transient failure and after switching the active device. Existing saved model choices remain intact; no data migration or credential reset is required.
Checklist