Configure: label MiniMax API-key auth methods

This commit is contained in:
Benjamin Jesuiter
2026-02-17 10:50:31 +01:00
parent 29327ac473
commit 5b765a60fe
2 changed files with 32 additions and 3 deletions

View File

@@ -0,0 +1,29 @@
import { describe, expect, it } from "vitest";
import type { AuthProfileStore } from "../agents/auth-profiles.js";
import { buildAuthChoiceGroups } from "./auth-choice-options.js";
const EMPTY_STORE: AuthProfileStore = { version: 1, profiles: {} };
describe("buildAuthChoiceGroups", () => {
it("labels MiniMax non-OAuth options as API-Key", () => {
const { groups } = buildAuthChoiceGroups({
store: EMPTY_STORE,
includeSkip: false,
});
const minimaxGroup = groups.find((group) => group.value === "minimax");
expect(minimaxGroup).toBeDefined();
expect(minimaxGroup?.options.find((opt) => opt.value === "minimax-portal")?.label).toContain(
"OAuth",
);
expect(minimaxGroup?.options.find((opt) => opt.value === "minimax-api")?.label).toContain(
"API-Key",
);
expect(
minimaxGroup?.options.find((opt) => opt.value === "minimax-api-key-cn")?.label,
).toContain("API-Key");
expect(
minimaxGroup?.options.find((opt) => opt.value === "minimax-api-lightning")?.label,
).toContain("API-Key");
});
});

View File

@@ -285,15 +285,15 @@ const BASE_AUTH_CHOICE_OPTIONS: ReadonlyArray<AuthChoiceOption> = [
label: "OpenCode Zen (multi-model proxy)",
hint: "Claude, GPT, Gemini via opencode.ai/zen",
},
{ value: "minimax-api", label: "MiniMax M2.5" },
{ value: "minimax-api", label: "MiniMax M2.5 (API-Key)" },
{
value: "minimax-api-key-cn",
label: "MiniMax M2.5 (CN)",
label: "MiniMax M2.5 (CN API-Key)",
hint: "China endpoint (api.minimaxi.com)",
},
{
value: "minimax-api-lightning",
label: "MiniMax M2.5 Lightning",
label: "MiniMax M2.5 Lightning (API-Key)",
hint: "Faster, higher output cost",
},
{ value: "custom-api-key", label: "Custom Provider" },