Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/JAVA/Openclaw/src/commands/models/   (KI Agentensystem Version 22©)  Datei vom 26.3.2026 mit Größe 1 kB image not shown  

Quelle  list.model-row.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 type { AuthProfileStore } from "../../agents/auth-profiles/types.js";
import { toModelRow } from "./list.model-row.js";

const OPENROUTER_MODEL = {
  provider: "openrouter",
  id: "openai/gpt-5.4",
  name: "GPT-5.4 via OpenRouter",
  api: "openai-chat-completions",
  baseUrl: "https://openrouter.ai/api/v1",
  input: ["text"],
  contextWindow: 1_000_000,
  maxTokens: 128_000,
  cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
} as const;

describe("toModelRow", () => {
  it("keeps native context metadata and effective runtime context tokens distinct", () => {
    const row = toModelRow({
      model: {
        ...OPENROUTER_MODEL,
        contextWindow: 400_000,
        contextTokens: 272_000,
      } as never,
      key: "openrouter/openai/gpt-5.4",
      tags: [],
    });

    expect(row).toMatchObject({
      contextWindow: 400_000,
      contextTokens: 272_000,
    });
  });

  it("marks models available from auth profiles without loading model discovery", () => {
    const authStore: AuthProfileStore = {
      version: 1,
      profiles: {
        "openrouter:default": {
          type: "api_key",
          provider: "openrouter",
          key: "sk-or-v1-regression-test",
        },
      },
    };

    const row = toModelRow({
      model: OPENROUTER_MODEL as never,
      key: "openrouter/openai/gpt-5.4",
      tags: [],
      cfg: {},
      authStore,
    });

    expect(row.available).toBe(true);
  });
});

¤ Dauer der Verarbeitung: 0.10 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.