Skip to content

Commit 0429f4c

Browse files
j4ys0nCopilot
andauthored
Copilot/claude fable 5 (#542)
* feat: add new anthropic baseline models * feat: add new anthropic baseline models * fix: remove latest flag from fable 5 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent 9f5abb9 commit 0429f4c

2 files changed

Lines changed: 26 additions & 9 deletions

File tree

packages/shared/src/agent-options/agent-options.test.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ describe("PROVIDER_CATALOGS", () => {
6363

6464
describe("resolveModelId", () => {
6565
it("resolves the opus alias to the latest dated id", () => {
66-
expect(resolveModelId("anthropic", "opus")).toBe("claude-opus-4-7");
66+
expect(resolveModelId("anthropic", "opus")).toBe("claude-opus-4-8");
6767
});
6868

6969
it("resolves the sonnet alias", () => {
@@ -74,6 +74,10 @@ describe("resolveModelId", () => {
7474
expect(resolveModelId("anthropic", "haiku")).toBe("claude-haiku-4-5-20251001");
7575
});
7676

77+
it("resolves the fable alias", () => {
78+
expect(resolveModelId("anthropic", "fable")).toBe("claude-fable-5");
79+
});
80+
7781
it("returns an exact-match dated id unchanged", () => {
7882
expect(resolveModelId("anthropic", "claude-sonnet-4-5")).toBe("claude-sonnet-4-5");
7983
});
@@ -87,7 +91,7 @@ describe("resolveModelId", () => {
8791

8892
it("returns the latest-marked model when no input is provided", () => {
8993
// Pick a provider with an explicit `latest` flag.
90-
expect(resolveModelId("anthropic", undefined)).toBe("claude-opus-4-7");
94+
expect(resolveModelId("anthropic", undefined)).toBe("claude-opus-4-8");
9195
});
9296

9397
it("returns undefined for free-text providers with no baseline models", () => {
@@ -102,7 +106,7 @@ describe("resolveModelId", () => {
102106
});
103107

104108
it("treats an empty string like undefined", () => {
105-
expect(resolveModelId("anthropic", "")).toBe("claude-opus-4-7");
109+
expect(resolveModelId("anthropic", "")).toBe("claude-opus-4-8");
106110
});
107111

108112
it("resolves gemini-pro alias", () => {
@@ -123,9 +127,9 @@ describe("mergeLiveModels", () => {
123127
});
124128

125129
it("preserves baseline metadata when a live id matches", () => {
126-
const opus = ANTHROPIC_CATALOG.models.find((m) => m.id === "claude-opus-4-7")!;
127-
const merged = mergeLiveModels(ANTHROPIC_CATALOG, ["claude-opus-4-7"]);
128-
const mergedOpus = merged.models.find((m) => m.id === "claude-opus-4-7")!;
130+
const opus = ANTHROPIC_CATALOG.models.find((m) => m.id === "claude-opus-4-8")!;
131+
const merged = mergeLiveModels(ANTHROPIC_CATALOG, ["claude-opus-4-8"]);
132+
const mergedOpus = merged.models.find((m) => m.id === "claude-opus-4-8")!;
129133
expect(mergedOpus.label).toBe(opus.label);
130134
expect(mergedOpus.latest).toBe(true);
131135
expect(mergedOpus.source).toBe("baseline");
@@ -160,7 +164,7 @@ describe("groupModelsByFamily", () => {
160164
it("groups anthropic models by family", () => {
161165
const groups = groupModelsByFamily(ANTHROPIC_CATALOG);
162166
const families = groups.map((g) => g.family).sort();
163-
expect(families).toEqual(["haiku", "opus", "sonnet"]);
167+
expect(families).toEqual(["fable", "haiku", "opus", "sonnet"]);
164168
});
165169

166170
it("falls back to the model id when there is no family", () => {

packages/shared/src/agent-options/anthropic.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,17 @@ export const ANTHROPIC_CATALOG: ProviderCatalog = {
1010
label: "Claude Code",
1111
modelField: "claudeModel",
1212
models: [
13+
{
14+
id: "claude-opus-4-8",
15+
label: "Opus 4.8",
16+
family: "opus",
17+
latest: true,
18+
source: "baseline",
19+
},
1320
{
1421
id: "claude-opus-4-7",
1522
label: "Opus 4.7",
1623
family: "opus",
17-
latest: true,
1824
source: "baseline",
1925
},
2026
{
@@ -43,11 +49,18 @@ export const ANTHROPIC_CATALOG: ProviderCatalog = {
4349
latest: true,
4450
source: "baseline",
4551
},
52+
{
53+
id: "claude-fable-5",
54+
label: "Fable 5",
55+
family: "fable",
56+
source: "baseline",
57+
},
4658
],
4759
aliases: {
48-
opus: "claude-opus-4-7",
60+
opus: "claude-opus-4-8",
4961
sonnet: "claude-sonnet-4-6",
5062
haiku: "claude-haiku-4-5-20251001",
63+
fable: "claude-fable-5",
5164
},
5265
options: [
5366
{

0 commit comments

Comments
 (0)