mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 15:30:47 +00:00
fix(providers): keep minimax chat models text-only
This commit is contained in:
@@ -38,7 +38,7 @@ describe("minimax model definitions", () => {
|
||||
id: "MiniMax-M2.7",
|
||||
name: "MiniMax M2.7",
|
||||
reasoning: true,
|
||||
input: ["text", "image"], // M2.7 supports images
|
||||
input: ["text"],
|
||||
});
|
||||
});
|
||||
|
||||
@@ -62,7 +62,7 @@ describe("minimax model definitions", () => {
|
||||
expect(model.cost).toEqual(MINIMAX_API_COST);
|
||||
expect(model.contextWindow).toBe(DEFAULT_MINIMAX_CONTEXT_WINDOW);
|
||||
expect(model.maxTokens).toBe(DEFAULT_MINIMAX_MAX_TOKENS);
|
||||
expect(model.input).toEqual(["text", "image"]);
|
||||
expect(model.input).toEqual(["text"]);
|
||||
});
|
||||
|
||||
it("falls back to generated name for unknown model id", () => {
|
||||
@@ -71,14 +71,14 @@ describe("minimax model definitions", () => {
|
||||
expect(model.reasoning).toBe(false);
|
||||
});
|
||||
|
||||
it("M2.7 model includes image input", () => {
|
||||
it("keeps M2.7 text-only on the Anthropic-compatible chat path", () => {
|
||||
const model = buildMinimaxApiModelDefinition("MiniMax-M2.7");
|
||||
expect(model.input).toEqual(["text", "image"]);
|
||||
expect(model.input).toEqual(["text"]);
|
||||
});
|
||||
|
||||
it("M2.7-highspeed model includes image input", () => {
|
||||
it("keeps M2.7-highspeed text-only on the Anthropic-compatible chat path", () => {
|
||||
const model = buildMinimaxApiModelDefinition("MiniMax-M2.7-highspeed");
|
||||
expect(model.input).toEqual(["text", "image"]);
|
||||
expect(model.input).toEqual(["text"]);
|
||||
expect(model.cost).toEqual(MINIMAX_API_HIGHSPEED_COST);
|
||||
});
|
||||
|
||||
|
||||
@@ -70,13 +70,11 @@ export function buildMinimaxModelDefinition(params: {
|
||||
maxTokens: number;
|
||||
}): ModelDefinitionConfig {
|
||||
const catalog = MINIMAX_TEXT_MODEL_CATALOG[params.id as MinimaxCatalogId];
|
||||
// MiniMax-M2.7 supports image input
|
||||
const isImageCapable = params.id === "MiniMax-M2.7" || params.id.startsWith("MiniMax-M2.7-");
|
||||
return {
|
||||
id: params.id,
|
||||
name: params.name ?? catalog?.name ?? `MiniMax ${params.id}`,
|
||||
reasoning: params.reasoning ?? catalog?.reasoning ?? false,
|
||||
input: isImageCapable ? ["text", "image"] : ["text"],
|
||||
input: ["text"],
|
||||
cost: params.cost,
|
||||
contextWindow: params.contextWindow,
|
||||
maxTokens: params.maxTokens,
|
||||
|
||||
@@ -21,6 +21,13 @@ describe("minimax onboard", () => {
|
||||
expect(cfg.models?.providers?.minimax?.models[0]?.reasoning).toBe(true);
|
||||
});
|
||||
|
||||
it("keeps MiniMax chat models text-only so image tools use MiniMax-VL-01", () => {
|
||||
const cfg = applyMinimaxApiConfig({}, "MiniMax-M2.7-highspeed");
|
||||
expect(cfg.models?.providers?.minimax?.models).toEqual([
|
||||
expect.objectContaining({ id: "MiniMax-M2.7-highspeed", input: ["text"] }),
|
||||
]);
|
||||
});
|
||||
|
||||
it("preserves existing model params when adding alias", () => {
|
||||
const cfg = applyMinimaxApiConfig(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user