onboard(minimax): flatten auth to 4 direct choices, unify CN/Global under single provider (#44284)
Replace the multi-step MiniMax onboarding wizard with 4 flat options: - MiniMax Global — OAuth (minimax.io) - MiniMax Global — API Key (minimax.io) - MiniMax CN — OAuth (minimaxi.com) - MiniMax CN — API Key (minimaxi.com) Storage changes: - Unify CN and Global under provider "minimax" (baseUrl distinguishes region) - Profiles: minimax:global / minimax:cn (both regions can coexist) - Model ref: minimax/MiniMax-M2.5 (no more minimax-cn/ prefix) - Remove LM Studio local mode and Lightning/Highspeed choice Backward compatibility: - Keep minimax-cn in provider-env-vars for existing configs - Accept minimax-cn as legacy tokenProvider in CI pipelines - Error with migration hint for removed auth choices in non-interactive mode - Warn when dual-profile overwrites shared provider baseUrl Made-with: Cursor
This commit is contained in:
@@ -9,20 +9,6 @@ import type { ProviderConfig } from "./models-config.providers.js";
|
||||
|
||||
describe("models-config merge helpers", () => {
|
||||
const preservedApiKey = "AGENT_KEY"; // pragma: allowlist secret
|
||||
const kimiModel: ProviderConfig["models"][number] = {
|
||||
id: "k2p5",
|
||||
name: "Kimi for Coding",
|
||||
input: ["text", "image"],
|
||||
reasoning: true,
|
||||
cost: {
|
||||
input: 0,
|
||||
output: 0,
|
||||
cacheRead: 0,
|
||||
cacheWrite: 0,
|
||||
},
|
||||
contextWindow: 128_000,
|
||||
maxTokens: 8_000,
|
||||
};
|
||||
|
||||
it("refreshes implicit model metadata while preserving explicit reasoning overrides", () => {
|
||||
const merged = mergeProviderModels(
|
||||
@@ -83,17 +69,31 @@ describe("models-config merge helpers", () => {
|
||||
it("preserves implicit provider headers when explicit config adds extra headers", () => {
|
||||
const merged = mergeProviderModels(
|
||||
{
|
||||
baseUrl: "https://api.example.com",
|
||||
api: "anthropic-messages",
|
||||
baseUrl: "https://api.anthropic.com",
|
||||
headers: { "User-Agent": "claude-code/0.1.0" },
|
||||
models: [kimiModel],
|
||||
} as ProviderConfig,
|
||||
models: [
|
||||
{
|
||||
id: "k2p5",
|
||||
name: "Kimi for Coding",
|
||||
input: ["text", "image"],
|
||||
reasoning: true,
|
||||
},
|
||||
],
|
||||
} as unknown as ProviderConfig,
|
||||
{
|
||||
baseUrl: "https://api.example.com",
|
||||
api: "anthropic-messages",
|
||||
baseUrl: "https://api.anthropic.com",
|
||||
headers: { "X-Kimi-Tenant": "tenant-a" },
|
||||
models: [kimiModel],
|
||||
} as ProviderConfig,
|
||||
models: [
|
||||
{
|
||||
id: "k2p5",
|
||||
name: "Kimi for Coding",
|
||||
input: ["text", "image"],
|
||||
reasoning: true,
|
||||
},
|
||||
],
|
||||
} as unknown as ProviderConfig,
|
||||
);
|
||||
|
||||
expect(merged.headers).toEqual({
|
||||
|
||||
@@ -187,7 +187,7 @@ const MODELSTUDIO_MODEL_CATALOG: ReadonlyArray<ProviderModelConfig> = [
|
||||
{
|
||||
id: "MiniMax-M2.5",
|
||||
name: "MiniMax-M2.5",
|
||||
reasoning: false,
|
||||
reasoning: true,
|
||||
input: ["text"],
|
||||
cost: MODELSTUDIO_DEFAULT_COST,
|
||||
contextWindow: 1_000_000,
|
||||
|
||||
Reference in New Issue
Block a user