mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-08 21:09:23 +08:00
feat: add Claude Opus 4.6 to built-in model catalog (#9853)
* feat: add Claude Opus 4.6 to built-in model catalog - Update default model from claude-opus-4-5 to claude-opus-4-6 - Add opus-4.6 model ID normalization - Add claude-opus-4-6 to live model filter prefixes - Update image tool to prefer claude-opus-4-6 for vision - Add CLI backend alias for opus-4.6 - Update onboard auth default selections to include opus-4.6 - Update model picker placeholder Closes #9811 * test: update tests for claude-opus-4-6 default - Fix model-alias-defaults test to use claude-opus-4-6 - Fix image-tool test to expect claude-opus-4-6 in fallbacks * feat: support claude-opus-4-6 * docs: update changelog for opus 4.6 (#9853) (thanks @TinyTb) * chore: bump pi to 0.52.0 --------- Co-authored-by: Slurpy <slurpy@openclaw.ai> Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
@@ -6,6 +6,7 @@ Docs: https://docs.openclaw.ai
|
||||
|
||||
### Changes
|
||||
|
||||
- Models: default Anthropic model to `anthropic/claude-opus-4-6`. (#9853) Thanks @TinyTb.
|
||||
- Telegram: auto-inject forum topic `threadId` in message tool and subagent announce so media, buttons, and subagent results land in the correct topic instead of General. (#7235) Thanks @Lukavyi.
|
||||
- CLI: sort `openclaw --help` commands (and options) alphabetically. (#8068) Thanks @deepsoumya617.
|
||||
- Telegram: remove last `@ts-nocheck` from `bot-handlers.ts`, use Grammy types directly, deduplicate `StickerMetadata`. Zero `@ts-nocheck` remaining in `src/telegram/`. (#9206)
|
||||
|
||||
@@ -108,10 +108,10 @@
|
||||
"@larksuiteoapi/node-sdk": "^1.58.0",
|
||||
"@line/bot-sdk": "^10.6.0",
|
||||
"@lydell/node-pty": "1.2.0-beta.3",
|
||||
"@mariozechner/pi-agent-core": "0.51.6",
|
||||
"@mariozechner/pi-ai": "0.51.6",
|
||||
"@mariozechner/pi-coding-agent": "0.51.6",
|
||||
"@mariozechner/pi-tui": "0.51.6",
|
||||
"@mariozechner/pi-agent-core": "0.52.0",
|
||||
"@mariozechner/pi-ai": "0.52.0",
|
||||
"@mariozechner/pi-coding-agent": "0.52.0",
|
||||
"@mariozechner/pi-tui": "0.52.0",
|
||||
"@mozilla/readability": "^0.6.0",
|
||||
"@sinclair/typebox": "0.34.48",
|
||||
"@slack/bolt": "^4.6.0",
|
||||
|
||||
57
pnpm-lock.yaml
generated
57
pnpm-lock.yaml
generated
@@ -49,17 +49,17 @@ importers:
|
||||
specifier: 1.2.0-beta.3
|
||||
version: 1.2.0-beta.3
|
||||
'@mariozechner/pi-agent-core':
|
||||
specifier: 0.51.6
|
||||
version: 0.51.6(ws@8.19.0)(zod@4.3.6)
|
||||
specifier: 0.52.0
|
||||
version: 0.52.0(ws@8.19.0)(zod@4.3.6)
|
||||
'@mariozechner/pi-ai':
|
||||
specifier: 0.51.6
|
||||
version: 0.51.6(ws@8.19.0)(zod@4.3.6)
|
||||
specifier: 0.52.0
|
||||
version: 0.52.0(ws@8.19.0)(zod@4.3.6)
|
||||
'@mariozechner/pi-coding-agent':
|
||||
specifier: 0.51.6
|
||||
version: 0.51.6(ws@8.19.0)(zod@4.3.6)
|
||||
specifier: 0.52.0
|
||||
version: 0.52.0(ws@8.19.0)(zod@4.3.6)
|
||||
'@mariozechner/pi-tui':
|
||||
specifier: 0.51.6
|
||||
version: 0.51.6
|
||||
specifier: 0.52.0
|
||||
version: 0.52.0
|
||||
'@mozilla/readability':
|
||||
specifier: ^0.6.0
|
||||
version: 0.6.0
|
||||
@@ -1457,22 +1457,22 @@ packages:
|
||||
resolution: {integrity: sha512-faGUlTcXka5l7rv0lP3K3vGW/ejRuOS24RR2aSFWREUQqzjgdsuWNo/IiPqL3kWRGt6Ahl2+qcDAwtdeWeuGUw==}
|
||||
hasBin: true
|
||||
|
||||
'@mariozechner/pi-agent-core@0.51.6':
|
||||
resolution: {integrity: sha512-57ybnrRdFssXsEoT0Ot71s+shzAaQJtGfGX2yTSwNicAbgei8L1mYuqWMUgQ1oSNv1fv59GMBo8nphIxw+GDxQ==}
|
||||
'@mariozechner/pi-agent-core@0.52.0':
|
||||
resolution: {integrity: sha512-4jmPixmg+nnU3yvUuz9pLeMYtwktTC9SOcfkCGqGWfAyvYOa6fc1KXfL/IGPk1cDG4INautQ0nHxGoIDwAKFww==}
|
||||
engines: {node: '>=20.0.0'}
|
||||
|
||||
'@mariozechner/pi-ai@0.51.6':
|
||||
resolution: {integrity: sha512-vzB7M2NPpjQmAZEtSN+v5rgYVhDUBoshtmXUGuHwx4SLIaHl1Z9eSeJg+HwclQPjesNuxhdBiHAHg8CEZ+3Dfg==}
|
||||
'@mariozechner/pi-ai@0.52.0':
|
||||
resolution: {integrity: sha512-fNyW5k3Ap3mSg2lmeZBYzMRfyDD+/7gSTSDax3OlME9hsXw72rhIrVpvQoivFNroupU/13BOy73y8rvyTEWQqQ==}
|
||||
engines: {node: '>=20.0.0'}
|
||||
hasBin: true
|
||||
|
||||
'@mariozechner/pi-coding-agent@0.51.6':
|
||||
resolution: {integrity: sha512-Rg3/C6a/30E1AoWHShoFUXMlvkvhK9xUEJTdApmIS51kCI4UuPcqw4fe9kq5I8KeMuAlcjo+jweMYrNVVvkNRw==}
|
||||
'@mariozechner/pi-coding-agent@0.52.0':
|
||||
resolution: {integrity: sha512-skUR/LYK0kupD8sTn0PCr/YnvGaBEpqSZgZxQ/gEjSzzRXa7Ywoxrr6y3Jvzk68Nv1JenKAyeR1GAI/3QPDKlA==}
|
||||
engines: {node: '>=20.0.0'}
|
||||
hasBin: true
|
||||
|
||||
'@mariozechner/pi-tui@0.51.6':
|
||||
resolution: {integrity: sha512-mG/RH5qArwLXcbnR3BOb8MRDGj4MvUD+c/AYySmC6XTkF+LVDw6Vc14cUcusblIUaE1GNmp+dxsRORmnh+0whg==}
|
||||
'@mariozechner/pi-tui@0.52.0':
|
||||
resolution: {integrity: sha512-SOWBWI+7SX/CgfmuyO1o+S1nhS5I1QmWrCXxd+2lvhqAvqBiVTmSt3W8RagdAH4G6D4WOcR0FFjqLFezlKV79w==}
|
||||
engines: {node: '>=20.0.0'}
|
||||
|
||||
'@matrix-org/matrix-sdk-crypto-nodejs@0.4.0':
|
||||
@@ -3760,6 +3760,10 @@ packages:
|
||||
hookified@1.15.1:
|
||||
resolution: {integrity: sha512-MvG/clsADq1GPM2KGo2nyfaWVyn9naPiXrqIe4jYjXNZQt238kWyOGrsyc/DmRAQ+Re6yeo6yX/yoNCG5KAEVg==}
|
||||
|
||||
hosted-git-info@9.0.2:
|
||||
resolution: {integrity: sha512-M422h7o/BR3rmCQ8UHi7cyyMqKltdP9Uo+J2fXK+RSAY+wTcKOIRyhTuKv4qn+DJf3g+PL890AzId5KZpX+CBg==}
|
||||
engines: {node: ^20.17.0 || >=22.9.0}
|
||||
|
||||
html-escaper@2.0.2:
|
||||
resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==}
|
||||
|
||||
@@ -6691,9 +6695,9 @@ snapshots:
|
||||
std-env: 3.10.0
|
||||
yoctocolors: 2.1.2
|
||||
|
||||
'@mariozechner/pi-agent-core@0.51.6(ws@8.19.0)(zod@4.3.6)':
|
||||
'@mariozechner/pi-agent-core@0.52.0(ws@8.19.0)(zod@4.3.6)':
|
||||
dependencies:
|
||||
'@mariozechner/pi-ai': 0.51.6(ws@8.19.0)(zod@4.3.6)
|
||||
'@mariozechner/pi-ai': 0.52.0(ws@8.19.0)(zod@4.3.6)
|
||||
transitivePeerDependencies:
|
||||
- '@modelcontextprotocol/sdk'
|
||||
- aws-crt
|
||||
@@ -6703,7 +6707,7 @@ snapshots:
|
||||
- ws
|
||||
- zod
|
||||
|
||||
'@mariozechner/pi-ai@0.51.6(ws@8.19.0)(zod@4.3.6)':
|
||||
'@mariozechner/pi-ai@0.52.0(ws@8.19.0)(zod@4.3.6)':
|
||||
dependencies:
|
||||
'@anthropic-ai/sdk': 0.71.2(zod@4.3.6)
|
||||
'@aws-sdk/client-bedrock-runtime': 3.983.0
|
||||
@@ -6727,18 +6731,19 @@ snapshots:
|
||||
- ws
|
||||
- zod
|
||||
|
||||
'@mariozechner/pi-coding-agent@0.51.6(ws@8.19.0)(zod@4.3.6)':
|
||||
'@mariozechner/pi-coding-agent@0.52.0(ws@8.19.0)(zod@4.3.6)':
|
||||
dependencies:
|
||||
'@mariozechner/jiti': 2.6.5
|
||||
'@mariozechner/pi-agent-core': 0.51.6(ws@8.19.0)(zod@4.3.6)
|
||||
'@mariozechner/pi-ai': 0.51.6(ws@8.19.0)(zod@4.3.6)
|
||||
'@mariozechner/pi-tui': 0.51.6
|
||||
'@mariozechner/pi-agent-core': 0.52.0(ws@8.19.0)(zod@4.3.6)
|
||||
'@mariozechner/pi-ai': 0.52.0(ws@8.19.0)(zod@4.3.6)
|
||||
'@mariozechner/pi-tui': 0.52.0
|
||||
'@silvia-odwyer/photon-node': 0.3.4
|
||||
chalk: 5.6.2
|
||||
cli-highlight: 2.1.11
|
||||
diff: 8.0.3
|
||||
file-type: 21.3.0
|
||||
glob: 13.0.1
|
||||
hosted-git-info: 9.0.2
|
||||
ignore: 7.0.5
|
||||
marked: 15.0.12
|
||||
minimatch: 10.1.2
|
||||
@@ -6755,7 +6760,7 @@ snapshots:
|
||||
- ws
|
||||
- zod
|
||||
|
||||
'@mariozechner/pi-tui@0.51.6':
|
||||
'@mariozechner/pi-tui@0.52.0':
|
||||
dependencies:
|
||||
'@types/mime-types': 2.1.4
|
||||
chalk: 5.6.2
|
||||
@@ -9302,6 +9307,10 @@ snapshots:
|
||||
|
||||
hookified@1.15.1: {}
|
||||
|
||||
hosted-git-info@9.0.2:
|
||||
dependencies:
|
||||
lru-cache: 11.2.5
|
||||
|
||||
html-escaper@2.0.2: {}
|
||||
|
||||
html-escaper@3.0.3: {}
|
||||
|
||||
@@ -9,8 +9,10 @@ export type ResolvedCliBackend = {
|
||||
|
||||
const CLAUDE_MODEL_ALIASES: Record<string, string> = {
|
||||
opus: "opus",
|
||||
"opus-4.6": "opus",
|
||||
"opus-4.5": "opus",
|
||||
"opus-4": "opus",
|
||||
"claude-opus-4-6": "opus",
|
||||
"claude-opus-4-5": "opus",
|
||||
"claude-opus-4": "opus",
|
||||
sonnet: "sonnet",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Defaults for agent metadata when upstream does not supply them.
|
||||
// Model id uses pi-ai's built-in Anthropic catalog.
|
||||
export const DEFAULT_PROVIDER = "anthropic";
|
||||
export const DEFAULT_MODEL = "claude-opus-4-5";
|
||||
// Context window: Opus 4.5 supports ~200k tokens (per pi-ai models.generated.ts).
|
||||
export const DEFAULT_MODEL = "claude-opus-4-6";
|
||||
// Context window: Opus supports ~200k tokens (per pi-ai models.generated.ts for Opus 4.5).
|
||||
export const DEFAULT_CONTEXT_TOKENS = 200_000;
|
||||
|
||||
@@ -3,11 +3,17 @@ export type ModelRef = {
|
||||
id?: string | null;
|
||||
};
|
||||
|
||||
const ANTHROPIC_PREFIXES = ["claude-opus-4-5", "claude-sonnet-4-5", "claude-haiku-4-5"];
|
||||
const ANTHROPIC_PREFIXES = [
|
||||
"claude-opus-4-6",
|
||||
"claude-opus-4-5",
|
||||
"claude-sonnet-4-5",
|
||||
"claude-haiku-4-5",
|
||||
];
|
||||
const OPENAI_MODELS = ["gpt-5.2", "gpt-5.0"];
|
||||
const CODEX_MODELS = [
|
||||
"gpt-5.2",
|
||||
"gpt-5.2-codex",
|
||||
"gpt-5.3-codex",
|
||||
"gpt-5.1-codex",
|
||||
"gpt-5.1-codex-mini",
|
||||
"gpt-5.1-codex-max",
|
||||
|
||||
@@ -59,9 +59,15 @@ function normalizeAnthropicModelId(model: string): string {
|
||||
return trimmed;
|
||||
}
|
||||
const lower = trimmed.toLowerCase();
|
||||
if (lower === "opus-4.6") {
|
||||
return "claude-opus-4-6";
|
||||
}
|
||||
if (lower === "opus-4.5") {
|
||||
return "claude-opus-4-5";
|
||||
}
|
||||
if (lower === "opus-4.6") {
|
||||
return "claude-opus-4-6";
|
||||
}
|
||||
if (lower === "sonnet-4.5") {
|
||||
return "claude-sonnet-4-5";
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ describe("image tool implicit imageModel config", () => {
|
||||
};
|
||||
expect(resolveImageModelConfigForTool({ cfg, agentDir })).toEqual({
|
||||
primary: "minimax/MiniMax-VL-01",
|
||||
fallbacks: ["openai/gpt-5-mini", "anthropic/claude-opus-4-5"],
|
||||
fallbacks: ["openai/gpt-5-mini", "anthropic/claude-opus-4-6"],
|
||||
});
|
||||
expect(createImageTool({ config: cfg, agentDir })).not.toBeNull();
|
||||
});
|
||||
|
||||
@@ -117,7 +117,7 @@ export function resolveImageModelConfigForTool(params: {
|
||||
} else if (primary.provider === "openai" && openaiOk) {
|
||||
preferred = "openai/gpt-5-mini";
|
||||
} else if (primary.provider === "anthropic" && anthropicOk) {
|
||||
preferred = "anthropic/claude-opus-4-5";
|
||||
preferred = "anthropic/claude-opus-4-6";
|
||||
}
|
||||
|
||||
if (preferred?.trim()) {
|
||||
@@ -125,7 +125,7 @@ export function resolveImageModelConfigForTool(params: {
|
||||
addFallback("openai/gpt-5-mini");
|
||||
}
|
||||
if (anthropicOk) {
|
||||
addFallback("anthropic/claude-opus-4-5");
|
||||
addFallback("anthropic/claude-opus-4-6");
|
||||
}
|
||||
// Don't duplicate primary in fallbacks.
|
||||
const pruned = fallbacks.filter((ref) => ref !== preferred);
|
||||
@@ -138,7 +138,7 @@ export function resolveImageModelConfigForTool(params: {
|
||||
// Cross-provider fallback when we can't pair with the primary provider.
|
||||
if (openaiOk) {
|
||||
if (anthropicOk) {
|
||||
addFallback("anthropic/claude-opus-4-5");
|
||||
addFallback("anthropic/claude-opus-4-6");
|
||||
}
|
||||
return {
|
||||
primary: "openai/gpt-5-mini",
|
||||
@@ -146,7 +146,7 @@ export function resolveImageModelConfigForTool(params: {
|
||||
};
|
||||
}
|
||||
if (anthropicOk) {
|
||||
return { primary: "anthropic/claude-opus-4-5" };
|
||||
return { primary: "anthropic/claude-opus-4-6" };
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
type GatewayAuthChoice = "token" | "password";
|
||||
|
||||
const ANTHROPIC_OAUTH_MODEL_KEYS = [
|
||||
"anthropic/claude-opus-4-6",
|
||||
"anthropic/claude-opus-4-5",
|
||||
"anthropic/claude-sonnet-4-5",
|
||||
"anthropic/claude-haiku-4-5",
|
||||
@@ -81,7 +82,7 @@ export async function promptAuthConfig(
|
||||
config: next,
|
||||
prompter,
|
||||
allowedKeys: anthropicOAuth ? ANTHROPIC_OAUTH_MODEL_KEYS : undefined,
|
||||
initialSelections: anthropicOAuth ? ["anthropic/claude-opus-4-5"] : undefined,
|
||||
initialSelections: anthropicOAuth ? ["anthropic/claude-opus-4-6"] : undefined,
|
||||
message: anthropicOAuth ? "Anthropic OAuth models" : undefined,
|
||||
});
|
||||
if (allowlistSelection.models) {
|
||||
|
||||
@@ -331,7 +331,7 @@ export async function promptModelAllowlist(params: {
|
||||
params.message ??
|
||||
"Allowlist models (comma-separated provider/model; blank to keep current)",
|
||||
initialValue: existingKeys.join(", "),
|
||||
placeholder: "openai-codex/gpt-5.2, anthropic/claude-opus-4-5",
|
||||
placeholder: "openai-codex/gpt-5.2, anthropic/claude-opus-4-6",
|
||||
});
|
||||
const parsed = String(raw ?? "")
|
||||
.split(",")
|
||||
|
||||
@@ -14,9 +14,9 @@ import {
|
||||
|
||||
export function applyMinimaxProviderConfig(cfg: OpenClawConfig): OpenClawConfig {
|
||||
const models = { ...cfg.agents?.defaults?.models };
|
||||
models["anthropic/claude-opus-4-5"] = {
|
||||
...models["anthropic/claude-opus-4-5"],
|
||||
alias: models["anthropic/claude-opus-4-5"]?.alias ?? "Opus",
|
||||
models["anthropic/claude-opus-4-6"] = {
|
||||
...models["anthropic/claude-opus-4-6"],
|
||||
alias: models["anthropic/claude-opus-4-6"]?.alias ?? "Opus",
|
||||
};
|
||||
models["lmstudio/minimax-m2.1-gs32"] = {
|
||||
...models["lmstudio/minimax-m2.1-gs32"],
|
||||
|
||||
@@ -13,7 +13,7 @@ type AnthropicAuthDefaultsMode = "api_key" | "oauth";
|
||||
|
||||
const DEFAULT_MODEL_ALIASES: Readonly<Record<string, string>> = {
|
||||
// Anthropic (pi-ai catalog uses "latest" ids without date suffix)
|
||||
opus: "anthropic/claude-opus-4-5",
|
||||
opus: "anthropic/claude-opus-4-6",
|
||||
sonnet: "anthropic/claude-sonnet-4-5",
|
||||
|
||||
// OpenAI
|
||||
|
||||
@@ -9,7 +9,7 @@ describe("applyModelDefaults", () => {
|
||||
agents: {
|
||||
defaults: {
|
||||
models: {
|
||||
"anthropic/claude-opus-4-5": {},
|
||||
"anthropic/claude-opus-4-6": {},
|
||||
"openai/gpt-5.2": {},
|
||||
},
|
||||
},
|
||||
@@ -17,7 +17,7 @@ describe("applyModelDefaults", () => {
|
||||
} satisfies OpenClawConfig;
|
||||
const next = applyModelDefaults(cfg);
|
||||
|
||||
expect(next.agents?.defaults?.models?.["anthropic/claude-opus-4-5"]?.alias).toBe("opus");
|
||||
expect(next.agents?.defaults?.models?.["anthropic/claude-opus-4-6"]?.alias).toBe("opus");
|
||||
expect(next.agents?.defaults?.models?.["openai/gpt-5.2"]?.alias).toBe("gpt");
|
||||
});
|
||||
|
||||
@@ -26,7 +26,7 @@ describe("applyModelDefaults", () => {
|
||||
agents: {
|
||||
defaults: {
|
||||
models: {
|
||||
"anthropic/claude-opus-4-5": { alias: "Opus" },
|
||||
"anthropic/claude-opus-4-6": { alias: "Opus" },
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -34,7 +34,7 @@ describe("applyModelDefaults", () => {
|
||||
|
||||
const next = applyModelDefaults(cfg);
|
||||
|
||||
expect(next.agents?.defaults?.models?.["anthropic/claude-opus-4-5"]?.alias).toBe("Opus");
|
||||
expect(next.agents?.defaults?.models?.["anthropic/claude-opus-4-6"]?.alias).toBe("Opus");
|
||||
});
|
||||
|
||||
it("respects explicit empty alias disables", () => {
|
||||
|
||||
@@ -53,7 +53,7 @@ const AUTO_IMAGE_KEY_PROVIDERS = ["openai", "anthropic", "google", "minimax"] as
|
||||
const AUTO_VIDEO_KEY_PROVIDERS = ["google"] as const;
|
||||
const DEFAULT_IMAGE_MODELS: Record<string, string> = {
|
||||
openai: "gpt-5-mini",
|
||||
anthropic: "claude-opus-4-5",
|
||||
anthropic: "claude-opus-4-6",
|
||||
google: "gemini-3-flash-preview",
|
||||
minimax: "MiniMax-VL-01",
|
||||
};
|
||||
|
||||
@@ -194,7 +194,7 @@ export async function describeStickerImage(params: DescribeStickerParams): Promi
|
||||
provider === "openai"
|
||||
? "gpt-5-mini"
|
||||
: provider === "anthropic"
|
||||
? "claude-opus-4-5"
|
||||
? "claude-opus-4-6"
|
||||
: provider === "google"
|
||||
? "gemini-3-flash-preview"
|
||||
: "MiniMax-VL-01";
|
||||
|
||||
Reference in New Issue
Block a user