From 5b765a60fea5dad54e9580e9dc49e8f0c0e0775b Mon Sep 17 00:00:00 2001 From: Benjamin Jesuiter Date: Tue, 17 Feb 2026 10:50:31 +0100 Subject: [PATCH] Configure: label MiniMax API-key auth methods --- src/commands/auth-choice-options.test.ts | 29 ++++++++++++++++++++++++ src/commands/auth-choice-options.ts | 6 ++--- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 src/commands/auth-choice-options.test.ts diff --git a/src/commands/auth-choice-options.test.ts b/src/commands/auth-choice-options.test.ts new file mode 100644 index 00000000000..5ecbf28e297 --- /dev/null +++ b/src/commands/auth-choice-options.test.ts @@ -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"); + }); +}); diff --git a/src/commands/auth-choice-options.ts b/src/commands/auth-choice-options.ts index e5269ab36bb..74222531aef 100644 --- a/src/commands/auth-choice-options.ts +++ b/src/commands/auth-choice-options.ts @@ -285,15 +285,15 @@ const BASE_AUTH_CHOICE_OPTIONS: ReadonlyArray = [ 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" },