Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  model-definitions.test.ts

  Sprache: JAVA
 

Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

import { describe, expect, it } from "vitest";
import {
  buildMinimaxApiModelDefinition,
  buildMinimaxModelDefinition,
  DEFAULT_MINIMAX_CONTEXT_WINDOW,
  DEFAULT_MINIMAX_MAX_TOKENS,
  MINIMAX_API_COST,
  MINIMAX_API_HIGHSPEED_COST,
  MINIMAX_HOSTED_MODEL_ID,
  MINIMAX_M25_API_COST,
  MINIMAX_M25_API_HIGHSPEED_COST,
} 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("uses the higher upstream MiniMax context and token defaults", () => {
    expect(DEFAULT_MINIMAX_CONTEXT_WINDOW).toBe(204800);
    expect(DEFAULT_MINIMAX_MAX_TOKENS).toBe(131072);
    expect(MINIMAX_API_COST).toEqual({
      input: 0.3,
      output: 1.2,
      cacheRead: 0.06,
      cacheWrite: 0.375,
    });
  });

  it("builds catalog model with name and reasoning from catalog for M2.7", () => {
    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,
      input: ["text"],
    });
  });

  it("builds non-catalog model with generated name and default reasoning", () => {
    const model = buildMinimaxModelDefinition({
      id: "MiniMax-M2.5",
      cost: MINIMAX_API_COST,
      contextWindow: DEFAULT_MINIMAX_CONTEXT_WINDOW,
      maxTokens: DEFAULT_MINIMAX_MAX_TOKENS,
    });
    expect(model).toMatchObject({
      id: "MiniMax-M2.5",
      name: "MiniMax MiniMax-M2.5",
      reasoning: false,
      input: ["text"], // M2.5 is not image-capable
    });
  });

  it("builds API model definition with standard cost for M2.7", () => {
    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);
    expect(model.input).toEqual(["text"]);
  });

  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);
  });

  it("keeps M2.7 text-only on the Anthropic-compatible chat path", () => {
    const model = buildMinimaxApiModelDefinition("MiniMax-M2.7");
    expect(model.input).toEqual(["text"]);
  });

  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"]);
    expect(model.cost).toEqual(MINIMAX_API_HIGHSPEED_COST);
  });

  it("M2.5 model remains text-only", () => {
    const model = buildMinimaxApiModelDefinition("MiniMax-M2.5");
    expect(model.input).toEqual(["text"]);
    expect(model.cost).toEqual(MINIMAX_M25_API_COST);
  });

  it("M2.5-highspeed keeps the M2.5 cache-read pricing", () => {
    const model = buildMinimaxApiModelDefinition("MiniMax-M2.5-highspeed");
    expect(model.cost).toEqual(MINIMAX_M25_API_HIGHSPEED_COST);
  });
});

¤ Dauer der Verarbeitung: 0.17 Sekunden  (vorverarbeitet am  2026-04-27) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge