Onboarding: add MiniMax hosted API key option
This commit is contained in:
committed by
Peter Steinberger
parent
7b79823b24
commit
a0bb2bccaf
@@ -30,8 +30,10 @@ import { healthCommand } from "./health.js";
|
||||
import {
|
||||
applyAuthProfileConfig,
|
||||
applyMinimaxConfig,
|
||||
applyMinimaxHostedConfig,
|
||||
setAnthropicApiKey,
|
||||
setGeminiApiKey,
|
||||
setMinimaxApiKey,
|
||||
} from "./onboard-auth.js";
|
||||
import {
|
||||
applyWizardMetadata,
|
||||
@@ -150,6 +152,20 @@ export async function runNonInteractiveOnboarding(
|
||||
});
|
||||
process.env.OPENAI_API_KEY = key;
|
||||
runtime.log(`Saved OPENAI_API_KEY to ${result.path}`);
|
||||
} else if (authChoice === "minimax-cloud") {
|
||||
const key = opts.minimaxApiKey?.trim();
|
||||
if (!key) {
|
||||
runtime.error("Missing --minimax-api-key");
|
||||
runtime.exit(1);
|
||||
return;
|
||||
}
|
||||
await setMinimaxApiKey(key);
|
||||
nextConfig = applyAuthProfileConfig(nextConfig, {
|
||||
profileId: "minimax:default",
|
||||
provider: "minimax",
|
||||
mode: "api_key",
|
||||
});
|
||||
nextConfig = applyMinimaxHostedConfig(nextConfig);
|
||||
} else if (authChoice === "claude-cli") {
|
||||
const store = ensureAuthProfileStore(undefined, {
|
||||
allowKeychainPrompt: false,
|
||||
|
||||
Reference in New Issue
Block a user