Add --auth-choice minimax-api for direct MiniMax API usage at https://api.minimax.io/anthropic using the anthropic-messages API. Changes: - Add applyMinimaxApiConfig() function with provider/model config - Add minimax-api to AuthChoice type and CLI options - Add handler and non-interactive support - Fix duplicate minimax entry in envMap - Update live test to use anthropic-messages API - Add 11 unit tests covering all edge cases - Document configuration in gateway docs Test results: - 11/11 unit tests pass - 1/1 live API test passes (verified with real API key) Co-Authored-By: Claude <noreply@anthropic.com>
61 lines
1.8 KiB
TypeScript
61 lines
1.8 KiB
TypeScript
import type { ChatProviderId } from "../providers/registry.js";
|
|
import type { GatewayDaemonRuntime } from "./daemon-runtime.js";
|
|
|
|
export type OnboardMode = "local" | "remote";
|
|
export type AuthChoice =
|
|
// Legacy alias for `setup-token` (kept for backwards CLI compatibility).
|
|
| "oauth"
|
|
| "setup-token"
|
|
| "claude-cli"
|
|
| "token"
|
|
| "openai-codex"
|
|
| "openai-api-key"
|
|
| "codex-cli"
|
|
| "antigravity"
|
|
| "apiKey"
|
|
| "gemini-api-key"
|
|
| "minimax-cloud"
|
|
| "minimax"
|
|
| "minimax-api"
|
|
| "skip";
|
|
export type GatewayAuthChoice = "off" | "token" | "password";
|
|
export type ResetScope = "config" | "config+creds+sessions" | "full";
|
|
export type GatewayBind = "loopback" | "lan" | "tailnet" | "auto";
|
|
export type TailscaleMode = "off" | "serve" | "funnel";
|
|
export type NodeManagerChoice = "npm" | "pnpm" | "bun";
|
|
export type ProviderChoice = ChatProviderId;
|
|
|
|
export type OnboardOptions = {
|
|
mode?: OnboardMode;
|
|
workspace?: string;
|
|
nonInteractive?: boolean;
|
|
authChoice?: AuthChoice;
|
|
/** Used when `authChoice=token` in non-interactive mode. */
|
|
tokenProvider?: string;
|
|
/** Used when `authChoice=token` in non-interactive mode. */
|
|
token?: string;
|
|
/** Used when `authChoice=token` in non-interactive mode. */
|
|
tokenProfileId?: string;
|
|
/** Used when `authChoice=token` in non-interactive mode. */
|
|
tokenExpiresIn?: string;
|
|
anthropicApiKey?: string;
|
|
openaiApiKey?: string;
|
|
geminiApiKey?: string;
|
|
minimaxApiKey?: string;
|
|
gatewayPort?: number;
|
|
gatewayBind?: GatewayBind;
|
|
gatewayAuth?: GatewayAuthChoice;
|
|
gatewayToken?: string;
|
|
gatewayPassword?: string;
|
|
tailscale?: TailscaleMode;
|
|
tailscaleResetOnExit?: boolean;
|
|
installDaemon?: boolean;
|
|
daemonRuntime?: GatewayDaemonRuntime;
|
|
skipSkills?: boolean;
|
|
skipHealth?: boolean;
|
|
nodeManager?: NodeManagerChoice;
|
|
remoteUrl?: string;
|
|
remoteToken?: string;
|
|
json?: boolean;
|
|
};
|