refactor: split minimax-cn provider

This commit is contained in:
Peter Steinberger
2026-02-14 13:37:04 +01:00
parent bf080c2338
commit 1ba266a8e8
7 changed files with 111 additions and 86 deletions

View File

@@ -50,13 +50,18 @@ export async function setGeminiApiKey(key: string, agentDir?: string) {
});
}
export async function setMinimaxApiKey(key: string, agentDir?: string) {
export async function setMinimaxApiKey(
key: string,
agentDir?: string,
profileId: string = "minimax:default",
) {
const provider = profileId.split(":")[0] ?? "minimax";
// Write to resolved agent dir so gateway finds credentials on startup.
upsertAuthProfile({
profileId: "minimax:default",
profileId,
credential: {
type: "api_key",
provider: "minimax",
provider,
key,
},
agentDir: resolveAuthAgentDir(agentDir),