mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 17:58:28 +00:00
feat: switch anthropic onboarding defaults to sonnet
This commit is contained in:
@@ -151,6 +151,14 @@ function addModelSelectOption(params: {
|
||||
params.seen.add(key);
|
||||
}
|
||||
|
||||
function isAnthropicLegacyModel(entry: { provider: string; id: string }): boolean {
|
||||
return (
|
||||
entry.provider === "anthropic" &&
|
||||
typeof entry.id === "string" &&
|
||||
entry.id.toLowerCase().startsWith("claude-3")
|
||||
);
|
||||
}
|
||||
|
||||
async function promptManualModel(params: {
|
||||
prompter: WizardPrompter;
|
||||
allowBlank: boolean;
|
||||
@@ -251,6 +259,9 @@ export async function promptDefaultModel(
|
||||
|
||||
if (hasPreferredProvider && preferredProvider) {
|
||||
models = models.filter((entry) => entry.provider === preferredProvider);
|
||||
if (preferredProvider === "anthropic") {
|
||||
models = models.filter((entry) => !isAnthropicLegacyModel(entry));
|
||||
}
|
||||
}
|
||||
|
||||
const agentDir = params.agentDir;
|
||||
|
||||
Reference in New Issue
Block a user