Onboarding: add MiniMax hosted API key option

This commit is contained in:
Tobias Bischoff
2026-01-08 15:10:18 +01:00
committed by Peter Steinberger
parent 7b79823b24
commit a0bb2bccaf
11 changed files with 293 additions and 522 deletions

View File

@@ -69,8 +69,10 @@ import { healthCommand } from "./health.js";
import {
applyAuthProfileConfig,
applyMinimaxConfig,
applyMinimaxHostedConfig,
setAnthropicApiKey,
setGeminiApiKey,
setMinimaxApiKey,
writeOAuthCredentials,
} from "./onboard-auth.js";
import {
@@ -357,6 +359,7 @@ async function promptAuthConfig(
| "antigravity"
| "gemini-api-key"
| "apiKey"
| "minimax-cloud"
| "minimax"
| "skip";
@@ -691,6 +694,21 @@ async function promptAuthConfig(
provider: "anthropic",
mode: "api_key",
});
} else if (authChoice === "minimax-cloud") {
const key = guardCancel(
await text({
message: "Enter MiniMax API key",
validate: (value) => (value?.trim() ? undefined : "Required"),
}),
runtime,
);
await setMinimaxApiKey(String(key).trim());
next = applyAuthProfileConfig(next, {
profileId: "minimax:default",
provider: "minimax",
mode: "api_key",
});
next = applyMinimaxHostedConfig(next);
} else if (authChoice === "minimax") {
next = applyMinimaxConfig(next);
}