* MiniMax: add M2.7 models and update default to M2.7 - Add MiniMax-M2.7 and MiniMax-M2.7-highspeed to provider catalog and model definitions - Update default model from MiniMax-M2.5 to MiniMax-M2.7 across onboard, portal, and provider configs - Update isModernMiniMaxModel to recognize M2.7 prefix - Update all test fixtures to reflect M2.7 as default Made-with: Cursor * MiniMax: add extension test for model definitions * update 2.7 * feat: add MiniMax M2.7 models and update default (#49691) (thanks @liyuan97) --------- Co-authored-by: George Zhang <georgezhangtj97@gmail.com>
43 lines
1.4 KiB
TypeScript
43 lines
1.4 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import {
|
|
buildMinimaxApiModelDefinition,
|
|
buildMinimaxModelDefinition,
|
|
DEFAULT_MINIMAX_CONTEXT_WINDOW,
|
|
DEFAULT_MINIMAX_MAX_TOKENS,
|
|
MINIMAX_API_COST,
|
|
MINIMAX_HOSTED_MODEL_ID,
|
|
} from "./model-definitions.js";
|
|
|
|
describe("minimax model definitions", () => {
|
|
it("uses M2.7 as default hosted model", () => {
|
|
expect(MINIMAX_HOSTED_MODEL_ID).toBe("MiniMax-M2.7");
|
|
});
|
|
|
|
it("builds catalog model with name and reasoning from catalog", () => {
|
|
const model = buildMinimaxModelDefinition({
|
|
id: "MiniMax-M2.7",
|
|
cost: MINIMAX_API_COST,
|
|
contextWindow: DEFAULT_MINIMAX_CONTEXT_WINDOW,
|
|
maxTokens: DEFAULT_MINIMAX_MAX_TOKENS,
|
|
});
|
|
expect(model).toMatchObject({
|
|
id: "MiniMax-M2.7",
|
|
name: "MiniMax M2.7",
|
|
reasoning: true,
|
|
});
|
|
});
|
|
|
|
it("builds API model definition with standard cost", () => {
|
|
const model = buildMinimaxApiModelDefinition("MiniMax-M2.7");
|
|
expect(model.cost).toEqual(MINIMAX_API_COST);
|
|
expect(model.contextWindow).toBe(DEFAULT_MINIMAX_CONTEXT_WINDOW);
|
|
expect(model.maxTokens).toBe(DEFAULT_MINIMAX_MAX_TOKENS);
|
|
});
|
|
|
|
it("falls back to generated name for unknown model id", () => {
|
|
const model = buildMinimaxApiModelDefinition("MiniMax-Future");
|
|
expect(model.name).toBe("MiniMax MiniMax-Future");
|
|
expect(model.reasoning).toBe(false);
|
|
});
|
|
});
|