Add Opus 4.8 to the Claude model picker
Opus 4.8 (and its 1M-context variant) become the default Claude models, pushing Opus 4.6 off the default slot. Opus 4.7 stays in the list as the previous release.
This commit is contained in:
@@ -45,6 +45,16 @@ interface ProviderListRow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const EXPECTED_CLAUDE_MODELS = [
|
const EXPECTED_CLAUDE_MODELS = [
|
||||||
|
{
|
||||||
|
id: "claude-opus-4-8[1m]",
|
||||||
|
model: "Opus 4.8 1M",
|
||||||
|
descriptionFragment: "1M context window",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "claude-opus-4-8",
|
||||||
|
model: "Opus 4.8",
|
||||||
|
descriptionFragment: "Latest release",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: "claude-opus-4-7[1m]",
|
id: "claude-opus-4-7[1m]",
|
||||||
model: "Opus 4.7 1M",
|
model: "Opus 4.7 1M",
|
||||||
@@ -53,7 +63,7 @@ const EXPECTED_CLAUDE_MODELS = [
|
|||||||
{
|
{
|
||||||
id: "claude-opus-4-7",
|
id: "claude-opus-4-7",
|
||||||
model: "Opus 4.7",
|
model: "Opus 4.7",
|
||||||
descriptionFragment: "Latest release",
|
descriptionFragment: "Previous release",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "claude-opus-4-6[1m]",
|
id: "claude-opus-4-6[1m]",
|
||||||
|
|||||||
@@ -401,6 +401,8 @@ describe("ClaudeAgentClient.listModels", () => {
|
|||||||
const models = await client.listModels({ cwd: "/tmp/claude-models", force: false });
|
const models = await client.listModels({ cwd: "/tmp/claude-models", force: false });
|
||||||
|
|
||||||
expect(models.map((m) => m.id)).toEqual([
|
expect(models.map((m) => m.id)).toEqual([
|
||||||
|
"claude-opus-4-8[1m]",
|
||||||
|
"claude-opus-4-8",
|
||||||
"claude-opus-4-7[1m]",
|
"claude-opus-4-7[1m]",
|
||||||
"claude-opus-4-7",
|
"claude-opus-4-7",
|
||||||
"claude-opus-4-6[1m]",
|
"claude-opus-4-6[1m]",
|
||||||
@@ -416,7 +418,7 @@ describe("ClaudeAgentClient.listModels", () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const defaultModel = models.find((m) => m.isDefault);
|
const defaultModel = models.find((m) => m.isDefault);
|
||||||
expect(defaultModel?.id).toBe("claude-opus-4-6");
|
expect(defaultModel?.id).toBe("claude-opus-4-8");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ describe("getClaudeModels", () => {
|
|||||||
it("returns all claude models", () => {
|
it("returns all claude models", () => {
|
||||||
const models = getClaudeModels();
|
const models = getClaudeModels();
|
||||||
expect(models.map((m) => m.id)).toEqual([
|
expect(models.map((m) => m.id)).toEqual([
|
||||||
|
"claude-opus-4-8[1m]",
|
||||||
|
"claude-opus-4-8",
|
||||||
"claude-opus-4-7[1m]",
|
"claude-opus-4-7[1m]",
|
||||||
"claude-opus-4-7",
|
"claude-opus-4-7",
|
||||||
"claude-opus-4-6[1m]",
|
"claude-opus-4-6[1m]",
|
||||||
@@ -49,7 +51,7 @@ describe("getClaudeModels", () => {
|
|||||||
const models = getClaudeModels();
|
const models = getClaudeModels();
|
||||||
const defaults = models.filter((m) => m.isDefault);
|
const defaults = models.filter((m) => m.isDefault);
|
||||||
expect(defaults).toHaveLength(1);
|
expect(defaults).toHaveLength(1);
|
||||||
expect(defaults[0].id).toBe("claude-opus-4-6");
|
expect(defaults[0].id).toBe("claude-opus-4-8");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("returns fresh copies each call", () => {
|
it("returns fresh copies each call", () => {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const CLAUDE_THINKING_OPTIONS = [
|
|||||||
{ id: "max", label: "Max" },
|
{ id: "max", label: "Max" },
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
const CLAUDE_OPUS_4_7_THINKING_OPTIONS = [
|
const CLAUDE_OPUS_EXTENDED_THINKING_OPTIONS = [
|
||||||
{ id: "low", label: "Low" },
|
{ id: "low", label: "Low" },
|
||||||
{ id: "medium", label: "Medium" },
|
{ id: "medium", label: "Medium" },
|
||||||
{ id: "high", label: "High" },
|
{ id: "high", label: "High" },
|
||||||
@@ -21,19 +21,34 @@ const CLAUDE_OPUS_4_7_THINKING_OPTIONS = [
|
|||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
const CLAUDE_MODELS: AgentModelDefinition[] = [
|
const CLAUDE_MODELS: AgentModelDefinition[] = [
|
||||||
|
{
|
||||||
|
provider: "claude",
|
||||||
|
id: "claude-opus-4-8[1m]",
|
||||||
|
label: "Opus 4.8 1M",
|
||||||
|
description: "Opus 4.8 with 1M context window",
|
||||||
|
thinkingOptions: [...CLAUDE_OPUS_EXTENDED_THINKING_OPTIONS],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
provider: "claude",
|
||||||
|
id: "claude-opus-4-8",
|
||||||
|
label: "Opus 4.8",
|
||||||
|
description: "Opus 4.8 · Latest release",
|
||||||
|
isDefault: true,
|
||||||
|
thinkingOptions: [...CLAUDE_OPUS_EXTENDED_THINKING_OPTIONS],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
provider: "claude",
|
provider: "claude",
|
||||||
id: "claude-opus-4-7[1m]",
|
id: "claude-opus-4-7[1m]",
|
||||||
label: "Opus 4.7 1M",
|
label: "Opus 4.7 1M",
|
||||||
description: "Opus 4.7 with 1M context window",
|
description: "Opus 4.7 with 1M context window",
|
||||||
thinkingOptions: [...CLAUDE_OPUS_4_7_THINKING_OPTIONS],
|
thinkingOptions: [...CLAUDE_OPUS_EXTENDED_THINKING_OPTIONS],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provider: "claude",
|
provider: "claude",
|
||||||
id: "claude-opus-4-7",
|
id: "claude-opus-4-7",
|
||||||
label: "Opus 4.7",
|
label: "Opus 4.7",
|
||||||
description: "Opus 4.7 · Latest release",
|
description: "Opus 4.7 · Previous release",
|
||||||
thinkingOptions: [...CLAUDE_OPUS_4_7_THINKING_OPTIONS],
|
thinkingOptions: [...CLAUDE_OPUS_EXTENDED_THINKING_OPTIONS],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provider: "claude",
|
provider: "claude",
|
||||||
@@ -47,7 +62,6 @@ const CLAUDE_MODELS: AgentModelDefinition[] = [
|
|||||||
id: "claude-opus-4-6",
|
id: "claude-opus-4-6",
|
||||||
label: "Opus 4.6",
|
label: "Opus 4.6",
|
||||||
description: "Opus 4.6 · Most capable for complex work",
|
description: "Opus 4.6 · Most capable for complex work",
|
||||||
isDefault: true,
|
|
||||||
thinkingOptions: [...CLAUDE_THINKING_OPTIONS],
|
thinkingOptions: [...CLAUDE_THINKING_OPTIONS],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user