feat: default Anthropic to Opus 4.7

This commit is contained in:
Peter Steinberger
2026-04-16 16:10:47 +01:00
parent 75c551e89e
commit 628b454eff
12 changed files with 108 additions and 28 deletions

View File

@@ -8,6 +8,7 @@ export type ModelRef = {
};
const HIGH_SIGNAL_LIVE_MODEL_PRIORITY = [
"anthropic/claude-opus-4-7",
"anthropic/claude-opus-4-6",
"anthropic/claude-sonnet-4-6",
"google/gemini-3.1-pro-preview",

View File

@@ -485,6 +485,7 @@ describe("isHighSignalLiveModelRef", () => {
describe("selectHighSignalLiveItems", () => {
it("prefers curated Google replacements before fallback provider spread", () => {
const items = [
{ provider: "anthropic", id: "claude-opus-4-7" },
{ provider: "anthropic", id: "claude-opus-4-6" },
{ provider: "google", id: "gemini-3.1-pro-preview" },
{ provider: "google", id: "gemini-3-flash-preview" },
@@ -500,10 +501,10 @@ describe("selectHighSignalLiveItems", () => {
(item) => item.provider,
),
).toEqual([
{ provider: "anthropic", id: "claude-opus-4-7" },
{ provider: "anthropic", id: "claude-opus-4-6" },
{ provider: "google", id: "gemini-3.1-pro-preview" },
{ provider: "google", id: "gemini-3-flash-preview" },
{ provider: "openai", id: "gpt-5.2" },
]);
});
});

View File

@@ -15,7 +15,7 @@ let defaultWarnState: WarnState = { warned: false };
const DEFAULT_MODEL_ALIASES: Readonly<Record<string, string>> = {
// Anthropic (pi-ai catalog uses "latest" ids without date suffix)
opus: "anthropic/claude-opus-4-6",
opus: "anthropic/claude-opus-4-7",
sonnet: "anthropic/claude-sonnet-4-6",
// OpenAI

View File

@@ -63,7 +63,7 @@ describe("applyModelDefaults", () => {
agents: {
defaults: {
models: {
"anthropic/claude-opus-4-6": {},
"anthropic/claude-opus-4-7": {},
"openai/gpt-5.4": {},
},
},
@@ -71,7 +71,7 @@ describe("applyModelDefaults", () => {
} satisfies OpenClawConfig;
const next = applyModelDefaults(cfg);
expect(next.agents?.defaults?.models?.["anthropic/claude-opus-4-6"]?.alias).toBe("opus");
expect(next.agents?.defaults?.models?.["anthropic/claude-opus-4-7"]?.alias).toBe("opus");
expect(next.agents?.defaults?.models?.["openai/gpt-5.4"]?.alias).toBe("gpt");
});
@@ -80,7 +80,7 @@ describe("applyModelDefaults", () => {
agents: {
defaults: {
models: {
"anthropic/claude-opus-4-6": { alias: "Opus" },
"anthropic/claude-opus-4-7": { alias: "Opus" },
},
},
},
@@ -88,7 +88,7 @@ describe("applyModelDefaults", () => {
const next = applyModelDefaults(cfg);
expect(next.agents?.defaults?.models?.["anthropic/claude-opus-4-6"]?.alias).toBe("Opus");
expect(next.agents?.defaults?.models?.["anthropic/claude-opus-4-7"]?.alias).toBe("Opus");
});
it("respects explicit empty alias disables", () => {

View File

@@ -16,7 +16,7 @@ const BUNDLED_MEDIA_PROVIDER_DEFAULTS: Record<string, BundledMediaProviderDefaul
defaultModels: { image: "gpt-5.4" },
},
anthropic: {
defaultModels: { image: "claude-opus-4-6" },
defaultModels: { image: "claude-opus-4-7" },
autoPriority: { image: 20 },
nativeDocumentInputs: ["pdf"],
},