Skip to content

Commit 08721b1

Browse files
committed
🤖 feat: upgrade Claude Opus to 4-5
1 parent 7ba4d15 commit 08721b1

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

mobile/app/workspace-settings.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,11 @@ import { ThemedText } from "../src/components/ThemedText";
1010
import { useWorkspaceDefaults } from "../src/hooks/useWorkspaceDefaults";
1111
import type { ThinkingLevel, WorkspaceMode } from "../src/types/settings";
1212
import { supports1MContext } from "@/common/utils/ai/models";
13+
import { KNOWN_MODEL_OPTIONS } from "@/common/constants/knownModels";
1314

1415
const MODE_TABS: WorkspaceMode[] = ["plan", "exec"];
1516
const THINKING_LEVELS: ThinkingLevel[] = ["off", "low", "medium", "high"];
1617

17-
// Common models from MODEL_ABBREVIATIONS
18-
const AVAILABLE_MODELS = [
19-
{ label: "Claude Sonnet 4.5", value: "anthropic:claude-sonnet-4-5" },
20-
{ label: "Claude Haiku 4.5", value: "anthropic:claude-haiku-4-5" },
21-
{ label: "Claude Opus 4.1", value: "anthropic:claude-opus-4-1" },
22-
{ label: "GPT-5", value: "openai:gpt-5" },
23-
{ label: "GPT-5 Pro", value: "openai:gpt-5-pro" },
24-
{ label: "GPT-5 Codex", value: "openai:gpt-5-codex" },
25-
];
26-
2718
function thinkingLevelToValue(level: ThinkingLevel): number {
2819
const index = THINKING_LEVELS.indexOf(level);
2920
return index >= 0 ? index : 0;
@@ -110,7 +101,7 @@ export default function WorkspaceSettings(): JSX.Element {
110101
}}
111102
dropdownIconColor={theme.colors.foregroundPrimary}
112103
>
113-
{AVAILABLE_MODELS.map((model) => (
104+
{KNOWN_MODEL_OPTIONS.map((model) => (
114105
<Picker.Item
115106
key={model.value}
116107
label={model.label}

src/common/constants/knownModels.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* Centralized model metadata. Update model versions here and everywhere else will follow.
33
*/
44

5+
import { formatModelDisplayName } from "../utils/ai/modelDisplay";
6+
57
type ModelProvider = "anthropic" | "openai" | "google" | "xai";
68

79
interface KnownModelDefinition {
@@ -43,7 +45,7 @@ const MODEL_DEFINITIONS = {
4345
},
4446
OPUS: {
4547
provider: "anthropic",
46-
providerModelId: "claude-opus-4-1",
48+
providerModelId: "claude-opus-4-5",
4749
aliases: ["opus"],
4850
},
4951
GPT: {
@@ -151,3 +153,9 @@ export const MODEL_NAMES: Record<ModelProvider, Record<string, string>> = Object
151153
},
152154
{} as Record<ModelProvider, Record<string, string>>
153155
);
156+
157+
/** Picker-friendly list: { label, value } for each known model */
158+
export const KNOWN_MODEL_OPTIONS = Object.values(KNOWN_MODELS).map((model) => ({
159+
label: formatModelDisplayName(model.providerModelId),
160+
value: model.id,
161+
}));

src/node/services/mock/scenarios/slashCommands.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,26 +65,26 @@ const modelStatusTurn: ScenarioTurn = {
6565
kind: "stream-start",
6666
delay: 0,
6767
messageId: "msg-slash-model-status",
68-
model: "anthropic:claude-opus-4-1",
68+
model: "anthropic:claude-opus-4-5",
6969
},
7070
{
7171
kind: "stream-delta",
7272
delay: STREAM_BASE_DELAY,
73-
text: "Claude Opus 4.1 is now responding with enhanced reasoning capacity.",
73+
text: "Claude Opus 4.5 is now responding with enhanced reasoning capacity.",
7474
},
7575
{
7676
kind: "stream-end",
7777
delay: STREAM_BASE_DELAY * 2,
7878
metadata: {
79-
model: "anthropic:claude-opus-4-1",
79+
model: "anthropic:claude-opus-4-5",
8080
inputTokens: 70,
8181
outputTokens: 54,
8282
systemMessageTokens: 12,
8383
},
8484
parts: [
8585
{
8686
type: "text",
87-
text: "I'm responding as Claude Opus 4.1, which you selected via /model opus. Let me know how to proceed.",
87+
text: "I'm responding as Claude Opus 4.5, which you selected via /model opus. Let me know how to proceed.",
8888
},
8989
],
9090
},

tests/e2e/scenarios/slashCommands.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,17 @@ test.describe("slash command flows", () => {
109109
).toBeVisible();
110110

111111
await ui.chat.sendMessage("/model opus");
112-
await ui.chat.expectStatusMessageContains("Model changed to anthropic:claude-opus-4-1");
113-
await expect(modeToggles.getByText("anthropic:claude-opus-4-1", { exact: true })).toBeVisible();
112+
await ui.chat.expectStatusMessageContains("Model changed to anthropic:claude-opus-4-5");
113+
await expect(modeToggles.getByText("anthropic:claude-opus-4-5", { exact: true })).toBeVisible();
114114

115115
const timeline = await ui.chat.captureStreamTimeline(async () => {
116116
await ui.chat.sendMessage(SLASH_COMMAND_PROMPTS.MODEL_STATUS);
117117
});
118118

119119
const streamStart = timeline.events.find((event) => event.type === "stream-start");
120-
expect(streamStart?.model).toBe("anthropic:claude-opus-4-1");
120+
expect(streamStart?.model).toBe("anthropic:claude-opus-4-5");
121121
await ui.chat.expectTranscriptContains(
122-
"Claude Opus 4.1 is now responding with enhanced reasoning capacity."
122+
"Claude Opus 4.5 is now responding with enhanced reasoning capacity."
123123
);
124124
});
125125

0 commit comments

Comments
 (0)