Claude Sonnet 5 Models#718
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
📝 WalkthroughWalkthroughThis PR updates Claude model IDs, aliases, and fallback defaults across desktop, iOS, and ade-cli. It also refreshes model discovery, catalog normalization, UI labels, CLI behavior, and related tests to use Sonnet 5 and Opus 4.8 canonical forms. ChangesClaude model canonicalization and defaults
Model discovery and session flows
UI, CLI, and platform fixtures
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
apps/ios/ADE/Views/Hub/HubComposerDrawer.swift (1)
1092-1106: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDead fallback cases in
hubPrettyModelName—workKnownModelDisplayNamealready handles them.
workKnownModelDisplayName(trimmed)(WorkModelCatalog.swift) is checked first and already returns a match for the exact literals"opus","opus[1m]","opus-1m","sonnet", and"haiku"(case-insensitive, trimmed identically). The localswitch lower { case "opus": ... case "sonnet": ... }block at Lines 1100-1102 can therefore never execute — it's unreachable. This PR even edits these unreachable strings (Opus 4.7→4.8, Sonnet 4.6→5), which only works because the real source of truth is elsewhere; if the two ever diverge, only the shared function's answer matters, and nobody will notice the local one is stale.The same dead pattern also exists in the sibling
prettyModelName/prettyNewChatModelName/prettyWorkChatModelNamehelpers (WorkChatComposerAndInputViews.swift, WorkNewChatScreen.swift, WorkTimelineHelpers.swift), all of which duplicate the sameopus/sonnet/haikufallback thatworkKnownModelDisplayNamealready fully covers.♻️ Proposed cleanup
let lower = trimmed.lowercased() - switch lower { - case "opus": return "Claude Opus 4.8 1M" - case "opus[1m]", "opus-1m": return "Claude Opus 4.7 1M" - case "sonnet": return "Claude Sonnet 5" - case "haiku": return "Claude Haiku 4.5" - default: break - } if lower.hasPrefix("claude-") {As per path instructions,
apps/ios/**/*.swiftshould be checked for "Swift conventions".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/ios/ADE/Views/Hub/HubComposerDrawer.swift` around lines 1092 - 1106, Remove the unreachable fallback mapping in hubPrettyModelName by relying on workKnownModelDisplayName(trimmed) as the single source of truth for the known literals. Delete the dead switch cases for opus, opus[1m]/opus-1m, sonnet, and haiku in HubComposerDrawer.swift, and then check the sibling helpers prettyModelName, prettyNewChatModelName, and prettyWorkChatModelName for the same duplicated fallback logic and remove those duplicates too so they stay consistent with WorkModelCatalog.swift.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/ios/ADE/Views/Work/WorkNewChatScreen.swift`:
- Around line 794-796: The model label mapping in WorkNewChatScreen’s switch
case is incorrect for the bare opus alias, which is currently shown as the 1M
variant. Update the opus case to display the plain Claude Opus 4.8 name, and
keep opus[1m]/opus-1m mapped to the 1M label as they already are. Make sure the
labels in this model-name lookup stay consistent with the aliases used by
claudeCliModels.ts and the distinct entries referenced by ADEDesignSystem.swift.
In `@apps/ios/ADE/Views/Work/WorkPreviews.swift`:
- Around line 46-47: The preview fixtures use inconsistent modelId formats,
which can break model metadata lookup in preview/UI code. Update the
chatSummary, chatSummaryFixture, and transcript done event fixtures in
WorkPreviews to use the same prefixed Anthropic id format as the rest of the
preview data, so all paths resolve the same catalog entry and render
consistently.
---
Nitpick comments:
In `@apps/ios/ADE/Views/Hub/HubComposerDrawer.swift`:
- Around line 1092-1106: Remove the unreachable fallback mapping in
hubPrettyModelName by relying on workKnownModelDisplayName(trimmed) as the
single source of truth for the known literals. Delete the dead switch cases for
opus, opus[1m]/opus-1m, sonnet, and haiku in HubComposerDrawer.swift, and then
check the sibling helpers prettyModelName, prettyNewChatModelName, and
prettyWorkChatModelName for the same duplicated fallback logic and remove those
duplicates too so they stay consistent with WorkModelCatalog.swift.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a1689165-44e1-4024-811d-6cd006a507b6
⛔ Files ignored due to path filters (4)
docs/ARCHITECTURE.mdis excluded by!docs/**docs/features/chat/README.mdis excluded by!docs/**docs/features/chat/agent-routing.mdis excluded by!docs/**docs/features/sync-and-multi-device/ios-companion.mdis excluded by!docs/**
📒 Files selected for processing (80)
apps/ade-cli/src/adeRpcServer.test.tsapps/ade-cli/src/cli.test.tsapps/ade-cli/src/headlessLinearServices.test.tsapps/ade-cli/src/services/modelPickerStore.test.tsapps/ade-cli/src/tuiClient/__tests__/RightPane.test.tsxapps/ade-cli/src/tuiClient/__tests__/TerminalPane.test.tsxapps/ade-cli/src/tuiClient/__tests__/adeApi.test.tsapps/ade-cli/src/tuiClient/__tests__/appInput.test.tsapps/ade-cli/src/tuiClient/__tests__/chatInfo.test.tsapps/ade-cli/src/tuiClient/components/ModelPicker/modelPickerLayout.test.tsapps/desktop/resources/voice/voice-glossary.jsonapps/desktop/src/main/services/ai/aiIntegrationService.test.tsapps/desktop/src/main/services/ai/aiIntegrationService.tsapps/desktop/src/main/services/ai/claudeModelUtils.test.tsapps/desktop/src/main/services/ai/claudeModelUtils.tsapps/desktop/src/main/services/ai/providerTaskRunner.test.tsapps/desktop/src/main/services/ai/tools/ctoOperatorTools.tsapps/desktop/src/main/services/ai/tools/orchestrationTools.test.tsapps/desktop/src/main/services/automations/automationService.tsapps/desktop/src/main/services/chat/agentChatService.test.tsapps/desktop/src/main/services/chat/agentChatService.tsapps/desktop/src/main/services/chat/cursorModelsDiscovery.test.tsapps/desktop/src/main/services/chat/droidModelsDiscovery.test.tsapps/desktop/src/main/services/chat/droidModelsDiscovery.tsapps/desktop/src/main/services/config/projectConfigService.test.tsapps/desktop/src/main/services/conflicts/conflictService.test.tsapps/desktop/src/main/services/cto/ctoStateService.tsapps/desktop/src/main/services/feedback/feedbackReporterService.test.tsapps/desktop/src/main/services/opencode/openCodeInventory.test.tsapps/desktop/src/main/services/opencode/openCodeInventory.tsapps/desktop/src/main/services/orchestration/orchestrationService.test.tsapps/desktop/src/main/services/orchestration/runtimeProfile.tsapps/desktop/src/main/services/prs/prMergeQueue.test.tsapps/desktop/src/main/services/usage/usagePricing.tsapps/desktop/src/main/services/usage/usageTrackingService.test.tsapps/desktop/src/main/utils/terminalSessionSignals.test.tsapps/desktop/src/renderer/browserMock.tsapps/desktop/src/renderer/components/automations/RulesTab.tsxapps/desktop/src/renderer/components/automations/TemplatesTab.tsxapps/desktop/src/renderer/components/chat/AgentChatComposer.test.tsxapps/desktop/src/renderer/components/chat/AgentChatMessageList.test.tsxapps/desktop/src/renderer/components/chat/AgentChatPane.test.tsxapps/desktop/src/renderer/components/chat/ModelPickerPendingInput.test.tsxapps/desktop/src/renderer/components/cto/ctoUi.test.tsxapps/desktop/src/renderer/components/lanes/useLaneWorkSessions.test.tsapps/desktop/src/renderer/components/prs/shared/PrResolverLaunchControls.test.tsxapps/desktop/src/renderer/components/prs/state/PrsContext.tsxapps/desktop/src/renderer/components/settings/ChatAppearancePreview.tsxapps/desktop/src/renderer/components/shared/ModelPicker/ModelPicker.test.tsxapps/desktop/src/renderer/components/shared/ModelPicker/ReasoningEffortPicker.test.tsxapps/desktop/src/renderer/components/shared/ModelPicker/modelCatalog.test.tsapps/desktop/src/renderer/components/shared/ModelPicker/modelOrdering.test.tsapps/desktop/src/renderer/components/shared/ModelPicker/modelPickerSearch.test.tsapps/desktop/src/renderer/components/shared/providerModelSelectorGrouping.test.tsapps/desktop/src/renderer/components/terminals/WorkViewArea.test.tsxapps/desktop/src/renderer/components/terminals/cliLaunch.test.tsapps/desktop/src/renderer/lib/claudeAuthPrompt.test.tsapps/desktop/src/renderer/lib/modelOptions.test.tsapps/desktop/src/shared/chatModelSwitching.test.tsapps/desktop/src/shared/claudeCliModels.tsapps/desktop/src/shared/modelProfiles.test.tsapps/desktop/src/shared/modelProfiles.tsapps/desktop/src/shared/modelRegistry.test.tsapps/desktop/src/shared/modelRegistry.tsapps/desktop/src/shared/types/config.tsapps/desktop/src/shared/types/core.tsapps/desktop/src/shared/types/models.tsapps/ios/ADE/Resources/VoiceGlossary.jsonapps/ios/ADE/Shared/ADESharedModels.swiftapps/ios/ADE/Views/Components/ADEDesignSystem.swiftapps/ios/ADE/Views/Cto/CtoIdentityEditor.swiftapps/ios/ADE/Views/Hub/HubComposerDrawer.swiftapps/ios/ADE/Views/Work/WorkChatComposerAndInputViews.swiftapps/ios/ADE/Views/Work/WorkChatHeaderAndMessageViews.swiftapps/ios/ADE/Views/Work/WorkModelCatalog.swiftapps/ios/ADE/Views/Work/WorkNewChatScreen.swiftapps/ios/ADE/Views/Work/WorkPreviews.swiftapps/ios/ADE/Views/Work/WorkTimelineHelpers.swiftapps/ios/ADETests/ADETests.swiftapps/ios/ADEWidgets/ADEAgentActivityWidget.swift
| case "opus": return "Claude Opus 4.8 1M" | ||
| case "opus[1m]", "opus-1m": return "Claude Opus 4.7 1M" | ||
| case "sonnet": return "Claude Sonnet 4.6" | ||
| case "sonnet": return "Claude Sonnet 5" |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Bare "opus" mislabeled as "1M" — should be plain Opus 4.8.
Per claudeCliModels.ts, bare opus resolves to claude-opus-4-8 (the non-1M model), while the 1M context variant is the separately-aliased opus[1m]/opus-1m → claude-opus-4-7[1m] (correctly labeled "Claude Opus 4.7 1M" on the next line). ADEDesignSystem.swift's own modelColors/modelReasoningTiers treat claude-opus-4-8 and claude-opus-4-7-1m as distinct entries, confirming these are different models. Labeling bare opus as "Claude Opus 4.8 1M" misleads users into thinking they get the 1M-context variant.
🐛 Proposed fix
switch lower {
- case "opus": return "Claude Opus 4.8 1M"
+ case "opus": return "Claude Opus 4.8"
case "opus[1m]", "opus-1m": return "Claude Opus 4.7 1M"
case "sonnet": return "Claude Sonnet 5"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| case "opus": return "Claude Opus 4.8 1M" | |
| case "opus[1m]", "opus-1m": return "Claude Opus 4.7 1M" | |
| case "sonnet": return "Claude Sonnet 4.6" | |
| case "sonnet": return "Claude Sonnet 5" | |
| case "opus": return "Claude Opus 4.8" | |
| case "opus[1m]", "opus-1m": return "Claude Opus 4.7 1M" | |
| case "sonnet": return "Claude Sonnet 5" |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@apps/ios/ADE/Views/Work/WorkNewChatScreen.swift` around lines 794 - 796, The
model label mapping in WorkNewChatScreen’s switch case is incorrect for the bare
opus alias, which is currently shown as the 1M variant. Update the opus case to
display the plain Claude Opus 4.8 name, and keep opus[1m]/opus-1m mapped to the
1M label as they already are. Make sure the labels in this model-name lookup
stay consistent with the aliases used by claudeCliModels.ts and the distinct
entries referenced by ADEDesignSystem.swift.
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fb9125c9f4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "opus-4.7", | ||
| "opus-4-7", | ||
| "claude-opus-4-7", | ||
| "anthropic/claude-opus-4-7", | ||
| "anthropic/claude-opus-4-7-api", |
There was a problem hiding this comment.
Preserve the Opus 4.6 compatibility aliases
When a saved task route, config, or tool call still supplies claude-opus-4-6 or anthropic/claude-opus-4-6, those strings used to resolve through the removed basic Opus descriptor, but this replacement alias list only forwards the 4.7 spellings. getModelById/resolveModelAlias now return undefined for the 4.6 forms, so callers such as CTO spawnChat can treat the request as an OpenCode model instead of native Claude Opus 4.8; add the prior 4.6 aliases to this forwarding list.
Useful? React with 👍 / 👎.
| "claude-opus-4-7[1m]", | ||
| "claude-opus-4-7-1m", | ||
| "anthropic/claude-opus-4-7-1m", |
There was a problem hiding this comment.
Keep old Opus 1M aliases resolving to the 1M row
For existing sessions or configs that reference the previous claude-opus-4-6-1m, claude-opus-4-6[1m], or anthropic/claude-opus-4-6-1m aliases, this shortened alias list no longer resolves them even though the 1M row is still selectable. Those stale refs lose their descriptor and reasoning metadata during restore or model matching; carry the old 4.6 1M aliases forward to anthropic/claude-opus-4-7-1m.
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8d535b626
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (normalized === "claude-sonnet-4-6" || normalized === "sonnet-4-6") { | ||
| return { | ||
| modelId: "claude-sonnet-5", | ||
| displayName: "Claude Sonnet 5", |
There was a problem hiding this comment.
Preserve the provider's advertised OpenCode id
When a connected Anthropic OpenCode provider still reports claude-sonnet-4-6 but not claude-sonnet-5, this branch publishes opencode/anthropic/claude-sonnet-5 as selectable. The same descriptor's openCodeModelId is later sent by resolveOpenCodeModelSelection, so the prompt request names a model absent from the provider list ADE just received. Preserve the reported runtime id and use aliases/display metadata for migration, or only rewrite once the canonical row is present.
Useful? React with 👍 / 👎.
| if (id === "claude-sonnet-4-6" || id === "sonnet-4-6") { | ||
| return { ...row, id: "claude-sonnet-5", displayName: "Sonnet 5 (1.2x)" }; |
There was a problem hiding this comment.
Keep Droid discovery runtime ids intact
When the Droid SDK/CLI reports only the legacy claude-sonnet-4-6 row, discovery now surfaces droid/claude-sonnet-5; ensureDroidSessionState and initial SDK settings send the descriptor's providerModelId as modelId, so ADE asks Droid for a model it did not advertise. Keep the discovered id as the runtime providerModelId and normalize only display/canonical lookup, or gate this rewrite on canonical availability.
Useful? React with 👍 / 👎.
| WorkModelOption(id: "claude-fable-5-thinking-xhigh", displayName: "Claude Fable 5 Thinking XHigh", tier: .flagship, tagline: "Cursor-routed Fable", provider: "claude"), | ||
| WorkModelOption(id: "claude-4.6-sonnet-thinking", displayName: "Sonnet 4.6 · Thinking", tier: .reasoning, tagline: "Extended reasoning", provider: "claude"), | ||
| WorkModelOption(id: "claude-4.6-sonnet", displayName: "Sonnet 4.6", tier: .balanced, tagline: "Fast coding default", provider: "claude"), | ||
| WorkModelOption(id: "claude-sonnet-5", displayName: "Claude Sonnet 5", tier: .balanced, tagline: "Balanced · 1M context", provider: "claude"), |
There was a problem hiding this comment.
Use Cursor model ids in the Cursor fallback catalog
When the iOS picker is using the curated Cursor catalog before/without a host catalog, selecting this Cursor-tab row sends provider cursor with modelId: "claude-sonnet-5". Desktop resolves that id through the Claude registry alias before provider-specific Cursor lookup, so the session is silently routed to Claude instead of Cursor. Use the Cursor SDK id (desktop discovery still advertises claude-4.6-sonnet-* with a Sonnet 5 label) or prefix it as a Cursor descriptor.
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 89b577eae8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| modelId: hasCanonicalSonnet ? "claude-sonnet-5" : modelId, | ||
| displayName: "Claude Sonnet 5", | ||
| contextWindow: 1_000_000, | ||
| maxOutputTokens: 128_000, |
There was a problem hiding this comment.
Preserve legacy OpenCode limits when not remapping
When an OpenCode Anthropic catalog only advertises the retired id (for example an older catalog with claude-sonnet-4-6 but no claude-sonnet-5), this branch keeps sending the legacy runtime id via modelId, but still reports Sonnet 5's 1M/128k limits. That makes the descriptor look safe for much larger prompts than the actual preserved legacy model accepted by OpenCode, so prompt packing/cost UI can overrun the model instead of falling back to the normal 200k/32k defaults until the canonical row is present. The same pattern appears in the Opus fallback branch just below.
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7cd88e1ce2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const row = normalizeDroidDiscoveredModel(rawRow); | ||
| const trimmed = String(row.id ?? "").trim(); | ||
| if (!trimmed || seen.has(trimmed)) continue; |
There was a problem hiding this comment.
Prefer canonical Droid rows after alias normalization
When the Droid SDK reports both a retired id and its replacement with the retired row first, this normalizes the retired row to the canonical id and the following seen.has(trimmed) skip drops the real canonical row. In that migration catalog shape, droid/claude-sonnet-5 or droid/claude-opus-4-8 is built from the stale row's reasoning/capability metadata, so newer reasoning tiers or vision/tool flags advertised only on the canonical row never reach the picker or launch controls.
Useful? React with 👍 / 👎.
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
@codex review |
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 24ba8872d1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| WorkModelOption(id: "claude-fable-5-thinking-xhigh", displayName: "Claude Fable 5 Thinking XHigh", tier: .flagship, tagline: "Cursor-routed Fable", provider: "claude"), | ||
| WorkModelOption(id: "claude-4.6-sonnet-thinking", displayName: "Sonnet 4.6 · Thinking", tier: .reasoning, tagline: "Extended reasoning", provider: "claude"), | ||
| WorkModelOption(id: "claude-4.6-sonnet", displayName: "Sonnet 4.6", tier: .balanced, tagline: "Fast coding default", provider: "claude"), | ||
| WorkModelOption(id: "cursor/claude-4.6-sonnet-medium", displayName: "Claude Sonnet 5", tier: .balanced, tagline: "Balanced · 1M context", provider: "cursor"), |
There was a problem hiding this comment.
Preserve the Sonnet label after selecting Cursor
When the iOS picker uses this curated Cursor row, WorkNewChatScreen and HubInlineComposer persist modelId = option.id but render the chip via prettyNewChatModelName(modelId) / hubPrettyModelName(modelId), which only recognize known Claude ids or strings starting with claude-. Because this new id starts with cursor/, selecting the displayed “Claude Sonnet 5” row leaves the composer showing the raw cursor/claude-4.6-sonnet-medium id instead of the Sonnet 5 label until a host catalog row supplies a different display path.
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 734cd04497
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| function normalizeDroidDiscoveredModel(row: DroidExecHelpModelRow): DroidExecHelpModelRow { | ||
| const id = row.id.trim().toLowerCase(); | ||
| if (id === "claude-sonnet-4-6" || id === "sonnet-4-6") { | ||
| return { ...row, id: "claude-sonnet-5", displayName: "Sonnet 5 (1.2x)" }; |
There was a problem hiding this comment.
Reset capabilities when renaming Droid Sonnet
When an older Droid SDK reports only the retired claude-sonnet-4-6 row, this rewrites only the id/display while preserving the stale row.capabilities and missing reasoningTiers from readSdkModelRows (for example reasoning: false, or vision: false when noImageSupport was set). The descriptor is then surfaced as droid/claude-sonnet-5, but downstream attachment handling checks modelDescriptor.capabilities.vision and converts images to text for non-vision models, so Droid Sonnet 5 chats from a retired-only catalog can lose image/reasoning support until a canonical row is also present. Apply the canonical Sonnet capabilities/tiers when migrating this row, as the OpenCode path does.
Useful? React with 👍 / 👎.
|
@codex review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5919df77e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "claude-opus-4-7": tokenPrice(5, 25, 0.5, 6.25), | ||
| "claude-opus-4-6": tokenPrice(5, 25, 0.5, 6.25), | ||
| "claude-opus-4-5": tokenPrice(5, 25, 0.5, 6.25), | ||
| "claude-sonnet-5": tokenPrice(3, 15, 0.3, 3.75), |
There was a problem hiding this comment.
Use Sonnet 5 intro pricing until September
Because this static fallback is used by cost estimation/budgeting when the dynamic pricing fetch is unavailable, adding Sonnet 5 at standard $3/$15 makes all Sonnet 5 usage through August 31, 2026 look 50% more expensive. Anthropic's pricing page lists Claude Sonnet 5 at $2 input / $10 output per MTok through August 31, 2026, with $3/$15 starting September 1, 2026 (https://platform.claude.com/docs/en/about-claude/pricing), so this should either encode the dated introductory price or avoid falling back to the future standard rate before then.
Useful? React with 👍 / 👎.
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 747a6355ef
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const normalizedCustomId = id.startsWith("custom:") ? id.slice("custom:".length) : id; | ||
| const replacement = canonicalDroidReplacementForAlias(normalizedCustomId); | ||
| if (replacement) return replacement; |
There was a problem hiding this comment.
Preserve custom Droid model rows during alias normalization
When a Droid row comes from ~/.factory/config.json, ADE surfaces it as custom:<model> and marks it as customProxy. Stripping custom: before alias replacement means a configured proxy such as custom:claude-sonnet-4-6 or custom:opus is converted into the built-in claude-sonnet-5/claude-opus-4-8 row, dropping customProxy and causing launches to bypass the user's custom proxy. Normalize only non-custom rows, or keep the custom: namespace when producing the replacement.
Useful? React with 👍 / 👎.
| "claude-opus-4-7": tokenPrice(5, 25, 0.5, 6.25), | ||
| "claude-opus-4-6": tokenPrice(5, 25, 0.5, 6.25), | ||
| "claude-opus-4-5": tokenPrice(5, 25, 0.5, 6.25), | ||
| "claude-sonnet-5": tokenPrice(2, 10, 0.2, 2.5), |
There was a problem hiding this comment.
Align Sonnet 5 usage pricing with the registry
This static usage-pricing entry prices claude-sonnet-5 at $2/$10 per 1M tokens, but the Sonnet 5 registry descriptor added in the same change advertises $3/$15 (inputPricePer1M/outputPricePer1M in apps/desktop/src/shared/modelRegistry.ts). When usage tracking prices a Sonnet 5 turn, spend summaries will disagree with the model picker/registry cost, so one of these sources needs to be corrected.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/desktop/src/main/services/opencode/openCodeInventory.ts (1)
165-234: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winAdd
opus-4.7to the Anthropic alias list here.apps/desktop/src/shared/modelRegistry.tsalready maps it toclaude-opus-4-8; without this branch, an OpenCode row foropus-4.7can fall back to the rawlimitvalues instead of the canonical 1,000,000 / 128,000 settings.openCodeInventory.test.tsshould cover that form too.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/desktop/src/main/services/opencode/openCodeInventory.ts` around lines 165 - 234, Add the missing Anthropic alias handling in normalizeOpenCodeProviderModel so OpenCode rows with modelId `opus-4.7` are normalized the same way as the existing Opus aliases and receive the canonical Claude Opus 4.8 1M settings. Update the Anthropic alias branch in openCodeInventory to include `opus-4.7` alongside the existing Opus variants, and make sure the returned modelId/displayName/capabilities stay aligned with the `claude-opus-4-8` mapping used elsewhere in modelRegistry. Also extend openCodeInventory.test coverage to assert that `opus-4.7` resolves to the canonical 1,000,000 / 128,000 limits.
🧹 Nitpick comments (1)
apps/desktop/src/main/services/opencode/openCodeInventory.ts (1)
165-234: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider extracting a single shared canonical-alias table.
normalizeOpenCodeProviderModelhere andnormalizeAnthropicRuntimeAliasinapps/desktop/src/shared/modelRegistry.tsmaintain two independent copies of the retired-Sonnet/Opus alias lists and canonical metadata (context window, tiers, capabilities). They've already drifted (see the missingopus-4.7finding above), which is exactly the kind of bug duplicated alias tables invite. Extracting one shared constant/helper that both files consume would remove this class of drift going forward.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/desktop/src/main/services/opencode/openCodeInventory.ts` around lines 165 - 234, `normalizeOpenCodeProviderModel` is maintaining a separate copy of the Anthropic alias/canonical metadata that already differs from `normalizeAnthropicRuntimeAlias`, so consolidate the retired Sonnet/Opus alias list and shared model metadata into one reusable table/helper. Update both `normalizeOpenCodeProviderModel` and `normalizeAnthropicRuntimeAlias` to consume the shared source so canonical model IDs, display names, context windows, tiers, and capabilities stay in sync and new aliases only need to be added in one place.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@apps/desktop/src/main/services/opencode/openCodeInventory.ts`:
- Around line 165-234: Add the missing Anthropic alias handling in
normalizeOpenCodeProviderModel so OpenCode rows with modelId `opus-4.7` are
normalized the same way as the existing Opus aliases and receive the canonical
Claude Opus 4.8 1M settings. Update the Anthropic alias branch in
openCodeInventory to include `opus-4.7` alongside the existing Opus variants,
and make sure the returned modelId/displayName/capabilities stay aligned with
the `claude-opus-4-8` mapping used elsewhere in modelRegistry. Also extend
openCodeInventory.test coverage to assert that `opus-4.7` resolves to the
canonical 1,000,000 / 128,000 limits.
---
Nitpick comments:
In `@apps/desktop/src/main/services/opencode/openCodeInventory.ts`:
- Around line 165-234: `normalizeOpenCodeProviderModel` is maintaining a
separate copy of the Anthropic alias/canonical metadata that already differs
from `normalizeAnthropicRuntimeAlias`, so consolidate the retired Sonnet/Opus
alias list and shared model metadata into one reusable table/helper. Update both
`normalizeOpenCodeProviderModel` and `normalizeAnthropicRuntimeAlias` to consume
the shared source so canonical model IDs, display names, context windows, tiers,
and capabilities stay in sync and new aliases only need to be added in one
place.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d6d5ef52-68d4-4f83-8a05-2afa8c835df9
📒 Files selected for processing (13)
apps/desktop/src/main/services/chat/agentChatService.test.tsapps/desktop/src/main/services/chat/agentChatService.tsapps/desktop/src/main/services/chat/droidModelsDiscovery.test.tsapps/desktop/src/main/services/chat/droidModelsDiscovery.tsapps/desktop/src/main/services/opencode/openCodeInventory.test.tsapps/desktop/src/main/services/opencode/openCodeInventory.tsapps/desktop/src/main/services/usage/usagePricing.tsapps/desktop/src/main/services/usage/usageTrackingService.test.tsapps/desktop/src/shared/modelRegistry.test.tsapps/desktop/src/shared/modelRegistry.tsapps/ios/ADE/Views/Work/WorkChatComposerAndInputViews.swiftapps/ios/ADE/Views/Work/WorkModelCatalog.swiftapps/ios/ADETests/ADETests.swift
🚧 Files skipped from review as they are similar to previous changes (5)
- apps/desktop/src/main/services/chat/droidModelsDiscovery.ts
- apps/desktop/src/main/services/usage/usagePricing.ts
- apps/ios/ADE/Views/Work/WorkChatComposerAndInputViews.swift
- apps/ios/ADE/Views/Work/WorkModelCatalog.swift
- apps/desktop/src/main/services/chat/agentChatService.test.ts
|
@codex review |
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
Updates ADE's Claude model catalog for the Anthropic Sonnet 5 migration: Sonnet now invokes
claude-sonnet-5, Sonnet 4.6 is removed from selectable rows, and retired aliases normalize forward.What Changed
Validation
node scripts/validate-docs.mjsnpm --prefix apps/desktop exec -- vitest run src/shared/modelRegistry.test.ts src/shared/modelProfiles.test.ts src/main/services/ai/claudeModelUtils.test.ts src/main/services/opencode/openCodeInventory.test.ts src/main/services/chat/droidModelsDiscovery.test.ts src/renderer/lib/modelOptions.test.ts src/renderer/components/shared/ModelPicker/modelCatalog.test.ts src/renderer/components/shared/ModelPicker/modelOrdering.test.ts src/renderer/components/shared/ModelPicker/ModelPicker.test.tsx src/renderer/components/chat/AgentChatPane.test.tsx src/renderer/components/chat/AgentChatComposer.test.tsx src/renderer/components/chat/AgentChatMessageList.test.tsx src/renderer/components/chat/ModelPickerPendingInput.test.tsxnpm --prefix apps/desktop run typechecknpm --prefix apps/desktop run lint(warnings only)npm --prefix apps/desktop run buildnpm --prefix apps/ade-cli run typechecknpm --prefix apps/ade-cli run testxcrun swiftc -parse apps/ios/ADE/Views/Work/WorkModelCatalog.swift apps/ios/ADE/Views/Hub/HubComposerDrawer.swift apps/ios/ADE/Views/Work/WorkNewChatScreen.swift apps/ios/ADE/Views/Components/ADEDesignSystem.swift apps/ios/ADETests/ADETests.swiftxcodebuild test -project apps/ios/ADE.xcodeproj -scheme ADE -destination id=2107A402-C2A7-4323-AF26-74A0AC406C44 -derivedDataPath build/DerivedData-ios-model-validation -skipPackagePluginValidation -only-testing:ADETests/ADETests/testMobileComposerReasoningTiersMirrorDesktopRegistry -only-testing:ADETests/ADETests/testDynamicWorkModelCatalogBuildsFromLiveHostModels -only-testing:ADETests/ADETests/testWorkModelCatalogFiltersCursorModelsByChatAndCliAvailability -only-testing:ADETests/ADETests/testWorkResolveCliProviderMapsModelFamiliesLikeDesktop -only-testing:ADETests/ADETests/testWorkTurnSeparatorsUsePerTurnModelAfterModelSwitch -only-testing:ADETests/ADETests/testPendingModelSelectionDecodesAgentBriefingWithoutSuggestedRouteRisks
Summary by CodeRabbit
Greptile Summary
This PR updates ADE for the Claude Sonnet 5 model migration. The main changes are:
Confidence Score: 5/5
This looks safe to merge.
No blocking issues found in the changed code.
What T-Rex did
Important Files Changed
Reviews (16): Last reviewed commit: "ship: preserve custom droid limits" | Re-trigger Greptile