Skip to content

Commit 471bca4

Browse files
fix: update model registry to Opus 4.8 and fix re-auth spinner
- 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>
1 parent 20250db commit 471bca4

3 files changed

Lines changed: 31 additions & 17 deletions

File tree

apps/desktop/src/main/ai/config/types.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type { SupportedProvider } from '../providers/types';
1313
// ============================================
1414

1515
/** Valid model shorthands used throughout the application */
16-
export type ModelShorthand = 'opus' | 'opus-1m' | 'opus-4.5' | 'sonnet' | 'haiku';
16+
export type ModelShorthand = 'opus' | 'opus-1m' | 'opus-4.6' | 'opus-4.5' | 'sonnet' | 'haiku';
1717

1818
/** Valid thinking levels */
1919
export type ThinkingLevel = 'low' | 'medium' | 'high' | 'xhigh';
@@ -35,8 +35,9 @@ export type Phase = 'spec' | 'planning' | 'coding' | 'qa';
3535
* - apps/desktop/src/shared/constants/models.ts MODEL_ID_MAP
3636
*/
3737
export const MODEL_ID_MAP: Record<ModelShorthand, string> = {
38-
opus: 'claude-opus-4-6',
39-
'opus-1m': 'claude-opus-4-6',
38+
opus: 'claude-opus-4-8',
39+
'opus-1m': 'claude-opus-4-8',
40+
'opus-4.6': 'claude-opus-4-6',
4041
'opus-4.5': 'claude-opus-4-5-20251101',
4142
sonnet: 'claude-sonnet-4-6',
4243
haiku: 'claude-haiku-4-5-20251001',
@@ -84,6 +85,7 @@ export const EFFORT_LEVEL_MAP: Record<EffortLevel, string> = {
8485
*/
8586
export const ADAPTIVE_THINKING_MODELS: ReadonlySet<string> = new Set([
8687
'claude-opus-4-6',
88+
'claude-opus-4-8',
8789
]);
8890

8991
// ============================================

apps/desktop/src/main/ipc-handlers/claude-code-handlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,7 @@ export function registerClaudeCodeHandlers(): void {
15641564
profileManager.saveProfile(profile);
15651565
clearKeychainCache(expandedConfigDir);
15661566
const usageMonitor = getUsageMonitor();
1567-
usageMonitor.clearProfileUsageCache(profileId);
1567+
usageMonitor.clearAuthFailedProfile(profileId);
15681568
usageMonitor.checkNow();
15691569
console.warn('[Claude Code] Triggered immediate usage check after re-authentication:', profileId);
15701570

apps/desktop/src/shared/constants/models.ts

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ import type { BuiltinProvider } from '../types/provider-account';
1111
// ============================================
1212

1313
export const AVAILABLE_MODELS = [
14-
{ value: 'opus', label: 'Claude Opus 4.6' },
15-
{ value: 'opus-1m', label: 'Claude Opus 4.6 (1M)' },
14+
{ value: 'opus', label: 'Claude Opus 4.8' },
15+
{ value: 'opus-1m', label: 'Claude Opus 4.8 (1M)' },
16+
{ value: 'opus-4.6', label: 'Claude Opus 4.6' },
1617
{ value: 'opus-4.5', label: 'Claude Opus 4.5' },
1718
{ value: 'sonnet', label: 'Claude Sonnet 4.6' },
1819
{ value: 'haiku', label: 'Claude Haiku 4.5' }
@@ -38,9 +39,10 @@ export interface ModelOption {
3839

3940
export const ALL_AVAILABLE_MODELS: ModelOption[] = [
4041
// Anthropic
41-
{ value: 'opus', label: 'Claude Opus 4.6', provider: 'anthropic', description: 'Most capable', capabilities: { thinking: true, tools: true, vision: true, contextWindow: 200000 } },
42-
{ value: 'opus-1m', label: 'Claude Opus 4.6 (1M)', provider: 'anthropic', description: '1M context', capabilities: { thinking: true, tools: true, vision: true, contextWindow: 1000000 } },
42+
{ value: 'opus', label: 'Claude Opus 4.8', provider: 'anthropic', description: 'Most capable', capabilities: { thinking: true, tools: true, vision: true, contextWindow: 200000 } },
43+
{ value: 'opus-1m', label: 'Claude Opus 4.8 (1M)', provider: 'anthropic', description: '1M context', capabilities: { thinking: true, tools: true, vision: true, contextWindow: 1000000 } },
4344
{ value: 'sonnet', label: 'Claude Sonnet 4.6', provider: 'anthropic', description: 'Balanced', capabilities: { thinking: true, tools: true, vision: true, contextWindow: 200000 } },
45+
{ value: 'opus-4.6', label: 'Claude Opus 4.6', provider: 'anthropic', description: 'Legacy', capabilities: { thinking: true, tools: true, vision: true, contextWindow: 200000 } },
4446
{ value: 'opus-4.5', label: 'Claude Opus 4.5', provider: 'anthropic', description: 'Legacy', capabilities: { thinking: true, tools: true, vision: true, contextWindow: 200000 } },
4547
{ value: 'haiku', label: 'Claude Haiku 4.5', provider: 'anthropic', description: 'Fast', capabilities: { thinking: false, tools: true, vision: true, contextWindow: 200000 } },
4648
// OpenAI
@@ -76,8 +78,9 @@ export const ALL_AVAILABLE_MODELS: ModelOption[] = [
7678
// Maps model shorthand to actual Claude model IDs
7779
// Values must match apps/desktop/src/main/ai/config/types.ts MODEL_ID_MAP
7880
export const MODEL_ID_MAP: Record<string, string> = {
79-
opus: 'claude-opus-4-6',
80-
'opus-1m': 'claude-opus-4-6',
81+
opus: 'claude-opus-4-8',
82+
'opus-1m': 'claude-opus-4-8',
83+
'opus-4.6': 'claude-opus-4-6',
8184
'opus-4.5': 'claude-opus-4-5-20251101',
8285
sonnet: 'claude-sonnet-4-6',
8386
haiku: 'claude-haiku-4-5-20251001'
@@ -407,6 +410,15 @@ export interface ProviderModelSpec {
407410
export const DEFAULT_MODEL_EQUIVALENCES: Record<string, Partial<Record<BuiltinProvider, ProviderModelSpec>>> = {
408411
// ── Anthropic shorthands ──────────────────────────────────────────────────
409412
'opus': {
413+
anthropic: { modelId: 'claude-opus-4-8', reasoning: { type: 'adaptive_effort', level: 'high' } },
414+
openai: { modelId: 'gpt-5.3-codex', reasoning: { type: 'reasoning_effort', level: 'high' } },
415+
google: { modelId: 'gemini-2.5-pro', reasoning: { type: 'thinking_toggle', level: 'high' } },
416+
xai: { modelId: 'grok-4-0709', reasoning: { type: 'reasoning_effort', level: 'high' } },
417+
mistral: { modelId: 'mistral-large-latest', reasoning: { type: 'none' } },
418+
groq: { modelId: 'meta-llama/llama-4-maverick', reasoning: { type: 'none' } },
419+
zai: { modelId: 'glm-5', reasoning: { type: 'none' } },
420+
},
421+
'opus-4.6': {
410422
anthropic: { modelId: 'claude-opus-4-6', reasoning: { type: 'adaptive_effort', level: 'high' } },
411423
openai: { modelId: 'gpt-5.3-codex', reasoning: { type: 'reasoning_effort', level: 'high' } },
412424
google: { modelId: 'gemini-2.5-pro', reasoning: { type: 'thinking_toggle', level: 'high' } },
@@ -417,7 +429,7 @@ export const DEFAULT_MODEL_EQUIVALENCES: Record<string, Partial<Record<BuiltinPr
417429
},
418430
'glm-5': {
419431
zai: { modelId: 'glm-5', reasoning: { type: 'none' } },
420-
anthropic: { modelId: 'claude-opus-4-6', reasoning: { type: 'adaptive_effort', level: 'high' } },
432+
anthropic: { modelId: 'claude-opus-4-8', reasoning: { type: 'adaptive_effort', level: 'high' } },
421433
openai: { modelId: 'gpt-5.3-codex', reasoning: { type: 'reasoning_effort', level: 'high' } },
422434
},
423435
'glm-4.7': {
@@ -426,7 +438,7 @@ export const DEFAULT_MODEL_EQUIVALENCES: Record<string, Partial<Record<BuiltinPr
426438
openai: { modelId: 'gpt-5.2', reasoning: { type: 'reasoning_effort', level: 'medium' } },
427439
},
428440
'opus-1m': {
429-
anthropic: { modelId: 'claude-opus-4-6', reasoning: { type: 'adaptive_effort', level: 'high' } },
441+
anthropic: { modelId: 'claude-opus-4-8', reasoning: { type: 'adaptive_effort', level: 'high' } },
430442
openai: { modelId: 'gpt-5.2', reasoning: { type: 'reasoning_effort', level: 'high' } },
431443
google: { modelId: 'gemini-2.5-pro', reasoning: { type: 'thinking_toggle', level: 'high' } },
432444
},
@@ -455,7 +467,7 @@ export const DEFAULT_MODEL_EQUIVALENCES: Record<string, Partial<Record<BuiltinPr
455467
// ── OpenAI models ─────────────────────────────────────────────────────────
456468
'gpt-5.3-codex': {
457469
openai: { modelId: 'gpt-5.3-codex', reasoning: { type: 'reasoning_effort', level: 'high' } },
458-
anthropic: { modelId: 'claude-opus-4-6', reasoning: { type: 'adaptive_effort', level: 'high' } },
470+
anthropic: { modelId: 'claude-opus-4-8', reasoning: { type: 'adaptive_effort', level: 'high' } },
459471
google: { modelId: 'gemini-2.5-pro', reasoning: { type: 'thinking_toggle', level: 'high' } },
460472
},
461473
'gpt-5.2': {
@@ -465,7 +477,7 @@ export const DEFAULT_MODEL_EQUIVALENCES: Record<string, Partial<Record<BuiltinPr
465477
},
466478
'gpt-5.2-codex': {
467479
openai: { modelId: 'gpt-5.2-codex', reasoning: { type: 'reasoning_effort', level: 'high' } },
468-
anthropic: { modelId: 'claude-opus-4-6', reasoning: { type: 'adaptive_effort', level: 'high' } },
480+
anthropic: { modelId: 'claude-opus-4-8', reasoning: { type: 'adaptive_effort', level: 'high' } },
469481
google: { modelId: 'gemini-2.5-pro', reasoning: { type: 'thinking_toggle', level: 'high' } },
470482
},
471483
'gpt-5.1-codex-mini': {
@@ -480,7 +492,7 @@ export const DEFAULT_MODEL_EQUIVALENCES: Record<string, Partial<Record<BuiltinPr
480492
},
481493
'o3': {
482494
openai: { modelId: 'o3', reasoning: { type: 'reasoning_effort', level: 'high' } },
483-
anthropic: { modelId: 'claude-opus-4-6', reasoning: { type: 'adaptive_effort', level: 'high' } },
495+
anthropic: { modelId: 'claude-opus-4-8', reasoning: { type: 'adaptive_effort', level: 'high' } },
484496
google: { modelId: 'gemini-2.5-pro', reasoning: { type: 'thinking_toggle', level: 'high' } },
485497
},
486498
'o4-mini': {
@@ -491,7 +503,7 @@ export const DEFAULT_MODEL_EQUIVALENCES: Record<string, Partial<Record<BuiltinPr
491503
// ── Google models ─────────────────────────────────────────────────────────
492504
'gemini-2.5-pro': {
493505
google: { modelId: 'gemini-2.5-pro', reasoning: { type: 'thinking_toggle', level: 'high' } },
494-
anthropic: { modelId: 'claude-opus-4-6', reasoning: { type: 'adaptive_effort', level: 'high' } },
506+
anthropic: { modelId: 'claude-opus-4-8', reasoning: { type: 'adaptive_effort', level: 'high' } },
495507
openai: { modelId: 'gpt-5.3-codex', reasoning: { type: 'reasoning_effort', level: 'high' } },
496508
},
497509
'gemini-2.5-flash': {
@@ -502,7 +514,7 @@ export const DEFAULT_MODEL_EQUIVALENCES: Record<string, Partial<Record<BuiltinPr
502514
// ── xAI models ────────────────────────────────────────────────────────────
503515
'grok-4-0709': {
504516
xai: { modelId: 'grok-4-0709', reasoning: { type: 'reasoning_effort', level: 'high' } },
505-
anthropic: { modelId: 'claude-opus-4-6', reasoning: { type: 'adaptive_effort', level: 'high' } },
517+
anthropic: { modelId: 'claude-opus-4-8', reasoning: { type: 'adaptive_effort', level: 'high' } },
506518
openai: { modelId: 'gpt-5.3-codex', reasoning: { type: 'reasoning_effort', level: 'high' } },
507519
},
508520
'grok-3-mini': {

0 commit comments

Comments
 (0)