fix: dedupe minimax non-interactive auth

This commit is contained in:
Peter Steinberger
2026-01-12 06:12:19 +00:00
parent 048ee4b838
commit 0baf08fda1

View File

@@ -284,10 +284,7 @@ export async function runNonInteractiveOnboarding(
mode: "api_key",
});
nextConfig = applyOpenrouterConfig(nextConfig);
} else if (
authChoice === "minimax-cloud" ||
authChoice === "minimax-api"
) {
} else if (authChoice === "minimax-cloud" || authChoice === "minimax-api") {
const resolved = await resolveNonInteractiveApiKey({
provider: "minimax",
cfg: baseConfig,
@@ -306,23 +303,6 @@ export async function runNonInteractiveOnboarding(
mode: "api_key",
});
const modelId = "MiniMax-M2.1";
const resolved = await resolveNonInteractiveApiKey({
provider: "minimax",
cfg: baseConfig,
flagValue: opts.minimaxApiKey,
flagName: "--minimax-api-key",
envVar: "MINIMAX_API_KEY",
runtime,
});
if (!resolved) return;
if (resolved.source !== "profile") {
await setMinimaxApiKey(resolved.key);
}
nextConfig = applyAuthProfileConfig(nextConfig, {
profileId: "minimax:default",
provider: "minimax",
mode: "api_key",
});
nextConfig = applyMinimaxApiConfig(nextConfig, modelId);
} else if (authChoice === "claude-cli") {
const store = ensureAuthProfileStore(undefined, {