Config: add MiniMax direct API authentication option
Makes apiKey optional in ModelProviderConfig so MiniMax can use auth profiles or environment variables (MINIMAX_API_KEY) instead of requiring explicit config. Changes: - src/config/types.ts: apiKey changed from required to optional - src/config/zod-schema.ts: use z.string().min(1).optional() for validation - src/commands/configure.ts: add minimax-api auth choice in wizard - src/commands/onboard-auth.ts: MiniMax provider omits apiKey (uses env/auth) - patches/@mariozechner__pi-ai@0.42.1.patch: map minimax → MINIMAX_API_KEY Auth Resolution Order (unchanged): 1. Auth profiles (highest priority) 2. Environment variables (MINIMAX_API_KEY, etc.) 3. Custom provider apiKey from models.json (lowest priority)
This commit is contained in:
@@ -55,3 +55,16 @@ index 20fb0a22aaa28f7ff7c2f44a8b628fa1d9d7d936..0bf46bfb4a6fac5a0304652e42566b2c
|
||||
const reasoningItem = JSON.parse(block.thinkingSignature);
|
||||
output.push(reasoningItem);
|
||||
}
|
||||
|
||||
diff --git a/dist/stream.js b/dist/stream.js
|
||||
index 0000000..2222222 100644
|
||||
--- a/dist/stream.js
|
||||
+++ b/dist/stream.js
|
||||
@@ -43,6 +43,7 @@ export function getEnvApiKey(provider) {
|
||||
xai: "XAI_API_KEY",
|
||||
openrouter: "OPENROUTER_API_KEY",
|
||||
zai: "ZAI_API_KEY",
|
||||
+ minimax: "MINIMAX_API_KEY",
|
||||
mistral: "MISTRAL_API_KEY",
|
||||
};
|
||||
const envVar = envMap[provider];
|
||||
|
||||
Reference in New Issue
Block a user