Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion models/anthropic/claude-haiku-4-5.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "Claude Haiku 4.5 (latest)"
name = "Claude Haiku 4.5"
description = "Fast Claude lane for lightweight agents, office tasks, and responsive chat"
family = "claude-haiku"
release_date = "2025-10-15"
Expand Down
2 changes: 1 addition & 1 deletion models/anthropic/claude-opus-4-0.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "Claude Opus 4 (latest)"
name = "Claude Opus 4"
description = "Flagship Claude model for deep reasoning, coding, and long-horizon agents"
family = "claude-opus"
release_date = "2025-05-22"
Expand Down
2 changes: 1 addition & 1 deletion models/anthropic/claude-opus-4-1.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "Claude Opus 4.1 (latest)"
name = "Claude Opus 4.1"
description = "Flagship Claude model for deep reasoning, coding, and long-horizon agents"
family = "claude-opus"
release_date = "2025-08-05"
Expand Down
2 changes: 1 addition & 1 deletion models/anthropic/claude-opus-4-5.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "Claude Opus 4.5 (latest)"
name = "Claude Opus 4.5"
description = "Flagship Claude model for deep reasoning, coding, and long-horizon agents"
family = "claude-opus"
release_date = "2025-11-24"
Expand Down
2 changes: 1 addition & 1 deletion models/anthropic/claude-sonnet-4-0.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "Claude Sonnet 4 (latest)"
name = "Claude Sonnet 4"
description = "Balanced Claude model for coding, analysis, agent workflows, and cost control"
family = "claude-sonnet"
release_date = "2025-05-22"
Expand Down
2 changes: 1 addition & 1 deletion models/anthropic/claude-sonnet-4-5.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "Claude Sonnet 4.5 (latest)"
name = "Claude Sonnet 4.5"
description = "Balanced Claude model for coding, analysis, agent workflows, and cost control"
family = "claude-sonnet"
release_date = "2025-09-29"
Expand Down
4 changes: 1 addition & 3 deletions packages/core/src/sync/providers/anthropic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,7 @@ export function buildAnthropicModel(
existing: ExistingModel | undefined,
baseModel?: string,
): SyncedModel {
const name = model.canonical_id !== undefined && !model.display_name.endsWith("(latest)")
? `${model.display_name} (latest)`
: model.display_name;
const name = model.display_name.replace(/\s*\(latest\)\s*$/i, "");
const reasoning = model.capabilities.thinking?.supported ?? existing?.reasoning ?? false;
const input = [
"text" as const,
Expand Down
16 changes: 13 additions & 3 deletions packages/core/test/sync.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -994,19 +994,29 @@ test("adds manual budget control for new Anthropic models", () => {
expect(model.reasoning_options).toEqual([{ type: "budget_tokens" }]);
});

test("labels Anthropic aliases as latest", () => {
test("never invents latest tags for Anthropic aliases", () => {
const model = buildAnthropicModel(anthropicModel({
id: "claude-sonnet-5",
canonical_id: "claude-sonnet-5-20260630",
}), undefined, "anthropic/claude-sonnet-5");

expect(model.name).toBe("Claude Sonnet 5 (latest)");
expect(model.name).toBe("Claude Sonnet 5");
});

test("strips stale latest suffix from Anthropic display names", () => {
const model = buildAnthropicModel(anthropicModel({
id: "claude-opus-4-5",
canonical_id: "claude-opus-4-5-20251101",
display_name: "Claude Opus 4.5 (latest)",
}), undefined, "anthropic/claude-opus-4-5");

expect(model.name).toBe("Claude Opus 4.5");
});

test("Anthropic sync preserves base model inheritance", () => {
const resolved = {
base_model: "anthropic/claude-opus-4-5",
name: "Claude Opus 4.5 (latest)",
name: "Claude Opus 4.5",
description: "Flagship Claude model",
release_date: "2025-11-24",
last_updated: "2025-11-24",
Expand Down
Loading