fix: dedupe minimax non-interactive auth
This commit is contained in:
@@ -284,10 +284,7 @@ export async function runNonInteractiveOnboarding(
|
|||||||
mode: "api_key",
|
mode: "api_key",
|
||||||
});
|
});
|
||||||
nextConfig = applyOpenrouterConfig(nextConfig);
|
nextConfig = applyOpenrouterConfig(nextConfig);
|
||||||
} else if (
|
} else if (authChoice === "minimax-cloud" || authChoice === "minimax-api") {
|
||||||
authChoice === "minimax-cloud" ||
|
|
||||||
authChoice === "minimax-api"
|
|
||||||
) {
|
|
||||||
const resolved = await resolveNonInteractiveApiKey({
|
const resolved = await resolveNonInteractiveApiKey({
|
||||||
provider: "minimax",
|
provider: "minimax",
|
||||||
cfg: baseConfig,
|
cfg: baseConfig,
|
||||||
@@ -306,23 +303,6 @@ export async function runNonInteractiveOnboarding(
|
|||||||
mode: "api_key",
|
mode: "api_key",
|
||||||
});
|
});
|
||||||
const modelId = "MiniMax-M2.1";
|
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);
|
nextConfig = applyMinimaxApiConfig(nextConfig, modelId);
|
||||||
} else if (authChoice === "claude-cli") {
|
} else if (authChoice === "claude-cli") {
|
||||||
const store = ensureAuthProfileStore(undefined, {
|
const store = ensureAuthProfileStore(undefined, {
|
||||||
|
|||||||
Reference in New Issue
Block a user