feat: switch anthropic onboarding defaults to sonnet

This commit is contained in:
Peter Steinberger
2026-02-18 04:37:50 +01:00
parent e8816c554f
commit f25bbbc37e
3 changed files with 22 additions and 2 deletions

View File

@@ -6,8 +6,11 @@ import {
} from "./auth-choice.api-key.js";
import type { ApplyAuthChoiceParams, ApplyAuthChoiceResult } from "./auth-choice.apply.js";
import { buildTokenProfileId, validateAnthropicSetupToken } from "./auth-token.js";
import { applyAgentDefaultModelPrimary } from "./onboard-auth.config-shared.js";
import { applyAuthProfileConfig, setAnthropicApiKey } from "./onboard-auth.js";
const DEFAULT_ANTHROPIC_MODEL = "anthropic/claude-sonnet-4-6";
export async function applyAuthChoiceAnthropic(
params: ApplyAuthChoiceParams,
): Promise<ApplyAuthChoiceResult | null> {
@@ -55,6 +58,9 @@ export async function applyAuthChoiceAnthropic(
provider,
mode: "token",
});
if (params.setDefaultModel) {
nextConfig = applyAgentDefaultModelPrimary(nextConfig, DEFAULT_ANTHROPIC_MODEL);
}
return { config: nextConfig };
}
@@ -94,6 +100,9 @@ export async function applyAuthChoiceAnthropic(
provider: "anthropic",
mode: "api_key",
});
if (params.setDefaultModel) {
nextConfig = applyAgentDefaultModelPrimary(nextConfig, DEFAULT_ANTHROPIC_MODEL);
}
return { config: nextConfig };
}