Onboarding: add MiniMax hosted API key option
This commit is contained in:
committed by
Peter Steinberger
parent
7b79823b24
commit
a0bb2bccaf
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user