mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 21:10:43 +00:00
feat: default Anthropic to Opus 4.7
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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" },
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
@@ -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"],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user