Skip to content

fix: update model registry to Opus 4.8 and fix re-auth spinner - #2024

Closed
DudiPeretz-Orca wants to merge 1 commit into
AndyMik90:developfrom
DudiPeretz-Orca:fix/model-registry-opus-4-8-and-reauth
Closed

fix: update model registry to Opus 4.8 and fix re-auth spinner#2024
DudiPeretz-Orca wants to merge 1 commit into
AndyMik90:developfrom
DudiPeretz-Orca:fix/model-registry-opus-4-8-and-reauth

Conversation

@DudiPeretz-Orca

@DudiPeretz-Orca DudiPeretz-Orca commented Jun 14, 2026

Copy link
Copy Markdown

Summary

  • Update model registry to Claude Opus 4.8 — The opus/opus-1m shorthands were still resolving to claude-opus-4-6. Updated across all registry locations (AVAILABLE_MODELS, ALL_AVAILABLE_MODELS, MODEL_ID_MAP, DEFAULT_MODEL_EQUIVALENCES, and the main-process mirror in ai/config/types.ts) to use claude-opus-4-8, the current flagship. Added opus-4.6 as a selectable legacy entry so users who need the prior model can still access it. Added claude-opus-4-8 to ADAPTIVE_THINKING_MODELS.
  • Fix re-auth spinner never clearing — After completing browser re-authentication in Settings → Accounts, the spinner would persist indefinitely. Root cause: the success handler called clearProfileUsageCache() which doesn't clear needsReauthProfiles, the Set that drives the "Re-authentication required" UI badge. Fixed by calling clearAuthFailedProfile() instead, which correctly clears both authFailedProfiles and needsReauthProfiles.

Files changed

  • apps/desktop/src/shared/constants/models.ts — model registry (UI + equivalences)
  • apps/desktop/src/main/ai/config/types.ts — main-process mirror + adaptive thinking set
  • apps/desktop/src/main/ipc-handlers/claude-code-handlers.ts — re-auth success handler

Test plan

  • Open Settings → Agent Profile → model selector, confirm "Claude Opus 4.8" is the default and "Claude Opus 4.6" appears as a Legacy option
  • Start a task with Opus selected, verify agent logs show claude-opus-4-8
  • Go to Settings → Accounts → Re-authenticate on an Anthropic OAuth account, complete browser login, verify spinner clears and the "Re-authentication required" badge disappears
  • Run npm run typecheck — no errors

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added support for Claude Opus 4.6 model variant
    • Updated available Claude Opus models with Opus 4.8 as the primary option
  • Improvements

    • Enhanced authentication profile management for improved reliability

- Upgrade `opus`/`opus-1m` shorthands to resolve to `claude-opus-4-8`
  (current flagship) across AVAILABLE_MODELS, ALL_AVAILABLE_MODELS,
  MODEL_ID_MAP, DEFAULT_MODEL_EQUIVALENCES, and the main-process mirror
  in ai/config/types.ts
- Add `opus-4.6` as a selectable legacy entry so users who need the
  prior model can still access it
- Add `claude-opus-4-8` to ADAPTIVE_THINKING_MODELS in types.ts
- Fix re-auth spinner never clearing: replace clearProfileUsageCache()
  with clearAuthFailedProfile() in the CLAUDE_AUTH_LOGIN_SUBPROCESS
  success handler so needsReauthProfiles is properly cleared

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Thanks so much for your interest in contributing to Aperant!

Pull requests are currently paused. We're rebuilding the entire app from the ground up for Aperant 3.0 (including new cloud features), so changes against the current codebase can't be merged — they'd be overwritten by the rewrite.

Most of the 3.0 work is happening in a separate development repo right now and will be merged here once it's ready — so although this repo looks quiet, the project is very much alive. 🚀

We're closing this PR for now, but we'd genuinely love your help shaping 3.0:

This is temporary — contributions will reopen once the 3.0 foundation lands. Thank you for understanding! 🙏

@github-actions github-actions Bot closed this Jun 14, 2026
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ebaa9d5f-6cbc-419e-adb0-ccfdfc3aa5c0

📥 Commits

Reviewing files that changed from the base of the PR and between 20250db and 471bca4.

📒 Files selected for processing (3)
  • apps/desktop/src/main/ai/config/types.ts
  • apps/desktop/src/main/ipc-handlers/claude-code-handlers.ts
  • apps/desktop/src/shared/constants/models.ts

📝 Walkthrough

Walkthrough

Promotes claude-opus-4-8 as the new primary Opus model by updating shorthand types, ID resolution maps, available model listings, and default equivalence tables across shared constants and main-process AI config. Retains opus-4.6 as a legacy shorthand mapped to claude-opus-4-6. Extends adaptive thinking support to claude-opus-4-8. Fixes post-login cache invalidation to call clearAuthFailedProfile instead of clearProfileUsageCache.

Changes

Opus 4.8 promotion and auth cache fix

Layer / File(s) Summary
Opus 4.8 model constants, ID maps, and equivalences
apps/desktop/src/shared/constants/models.ts
AVAILABLE_MODELS and ALL_AVAILABLE_MODELS replace the primary Opus entries with Claude Opus 4.8 and add opus-4.6 as a legacy option. MODEL_ID_MAP redirects opus/opus-1m to claude-opus-4-8 and maps opus-4.6 to claude-opus-4-6. DEFAULT_MODEL_EQUIVALENCES bulk-updates the Anthropic modelId from claude-opus-4-6 to claude-opus-4-8 across all affected shorthand rows.
AI config types: shorthand, ID map, and adaptive thinking
apps/desktop/src/main/ai/config/types.ts
ModelShorthand union gains opus-4.6. MODEL_ID_MAP mirrors the shared constants redirect. ADAPTIVE_THINKING_MODELS is extended to include claude-opus-4-8.
Post-auth cache invalidation fix
apps/desktop/src/main/ipc-handlers/claude-code-handlers.ts
On successful authentication in CLAUDE_AUTH_LOGIN_SUBPROCESS, the call is changed from usageMonitor.clearProfileUsageCache(profileId) to usageMonitor.clearAuthFailedProfile(profileId).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 A new Opus has hopped into the map,
Four-point-eight now wears the primary cap!
Legacy four-six still lingers around,
While auth clears the right cache — how sound!
The rabbit approves with a joyful tap. 🎉

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎉 Thanks for your first PR!

A maintainer will review it soon. Please make sure:

  • Your branch is synced with develop
  • CI checks pass
  • You've followed our contribution guide

Welcome to the Auto Claude community!

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the model configurations to introduce Claude Opus 4.8 as the default 'opus' and 'opus-1m' model, while transitioning Claude Opus 4.6 to a legacy 'opus-4.6' option. It also updates the re-authentication flow to clear the auth-failed profile cache. The review comments, which should both be addressed, point out that the re-authentication fix needs to be applied to the CLAUDE_PROFILE_VERIFY_AUTH handler as well, and that the new legacy opus-4.6 model should be added to ADAPTIVE_THINKING_MODELS and FAST_MODE_MODELS to ensure its capabilities are fully recognized.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

clearKeychainCache(expandedConfigDir);
const usageMonitor = getUsageMonitor();
usageMonitor.clearProfileUsageCache(profileId);
usageMonitor.clearAuthFailedProfile(profileId);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

While this correctly fixes the re-auth spinner issue for the subprocess login flow, the same bug exists in the CLAUDE_PROFILE_VERIFY_AUTH handler at line 1404, which still calls usageMonitor.clearProfileUsageCache(profileId) instead of usageMonitor.clearAuthFailedProfile(profileId). Users authenticating via the embedded terminal flow (which triggers CLAUDE_PROFILE_VERIFY_AUTH) will still experience the persistent spinner/badge bug. Please update line 1404 to use clearAuthFailedProfile(profileId) as well for consistency and correctness.

{ value: 'opus', label: 'Claude Opus 4.8', provider: 'anthropic', description: 'Most capable', capabilities: { thinking: true, tools: true, vision: true, contextWindow: 200000 } },
{ value: 'opus-1m', label: 'Claude Opus 4.8 (1M)', provider: 'anthropic', description: '1M context', capabilities: { thinking: true, tools: true, vision: true, contextWindow: 1000000 } },
{ value: 'sonnet', label: 'Claude Sonnet 4.6', provider: 'anthropic', description: 'Balanced', capabilities: { thinking: true, tools: true, vision: true, contextWindow: 200000 } },
{ value: 'opus-4.6', label: 'Claude Opus 4.6', provider: 'anthropic', description: 'Legacy', capabilities: { thinking: true, tools: true, vision: true, contextWindow: 200000 } },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Since opus-4.6 is added as a legacy selectable model, it should also be included in the ADAPTIVE_THINKING_MODELS and FAST_MODE_MODELS arrays in apps/desktop/src/shared/constants/models.ts (lines 360 and 363) so that the UI and other parts of the application correctly recognize its capabilities (such as adaptive thinking and fast mode support).

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.

2 participants