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


Quelle  prompt-overlay-runtime-contract.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 {
  GPT5_CONTRACT_MODEL_ID,
  GPT5_PREFIXED_CONTRACT_MODEL_ID,
  NON_GPT5_CONTRACT_MODEL_ID,
  NON_OPENAI_CONTRACT_PROVIDER_ID,
  CODEX_CONTRACT_PROVIDER_ID,
  OPENAI_CODEX_CONTRACT_PROVIDER_ID,
  OPENAI_CONTRACT_PROVIDER_ID,
  openAiPluginPersonalityConfig,
  sharedGpt5PersonalityConfig,
} from "../../test/helpers/agents/prompt-overlay-runtime-contract.js";
import { resolveGpt5SystemPromptContribution } from "./gpt5-prompt-overlay.js";

describe("GPT-5 prompt overlay runtime contract", () => {
  it("adds the behavior contract and friendly style to OpenAI-family GPT-5 models by default", () => {
    const contribution = resolveGpt5SystemPromptContribution({
      providerId: OPENAI_CONTRACT_PROVIDER_ID,
      modelId: GPT5_CONTRACT_MODEL_ID,
    });

    expect(contribution?.stablePrefix).toContain("<persona_latch>");
    expect(contribution?.sectionOverrides?.interaction_style).toContain(
      "This is a live chat, not a memo.",
    );
  });

  it("lets the shared GPT-5 overlay config disable friendly style without removing the behavior contract", () => {
    const contribution = resolveGpt5SystemPromptContribution({
      providerId: NON_OPENAI_CONTRACT_PROVIDER_ID,
      modelId: GPT5_PREFIXED_CONTRACT_MODEL_ID,
      config: sharedGpt5PersonalityConfig("off"),
    });

    expect(contribution?.stablePrefix).toContain("<persona_latch>");
    expect(contribution?.sectionOverrides).toEqual({});
  });

  it("scopes OpenAI plugin personality fallback to OpenAI-family GPT-5 providers", () => {
    const openAiContribution = resolveGpt5SystemPromptContribution({
      providerId: OPENAI_CODEX_CONTRACT_PROVIDER_ID,
      modelId: GPT5_CONTRACT_MODEL_ID,
      config: openAiPluginPersonalityConfig("off"),
    });
    const nonOpenAiContribution = resolveGpt5SystemPromptContribution({
      providerId: NON_OPENAI_CONTRACT_PROVIDER_ID,
      modelId: GPT5_PREFIXED_CONTRACT_MODEL_ID,
      config: openAiPluginPersonalityConfig("off"),
    });

    expect(openAiContribution?.stablePrefix).toContain("<persona_latch>");
    expect(openAiContribution?.sectionOverrides).toEqual({});
    expect(nonOpenAiContribution?.stablePrefix).toContain("<persona_latch>");
    expect(nonOpenAiContribution?.sectionOverrides?.interaction_style).toContain(
      "This is a live chat, not a memo.",
    );
  });

  it("keeps Codex virtual providers in the OpenAI-family personality fallback scope", () => {
    const contribution = resolveGpt5SystemPromptContribution({
      providerId: CODEX_CONTRACT_PROVIDER_ID,
      modelId: GPT5_CONTRACT_MODEL_ID,
      config: openAiPluginPersonalityConfig("off"),
    });

    expect(contribution?.stablePrefix).toContain("<persona_latch>");
    expect(contribution?.sectionOverrides).toEqual({});
  });

  it("does not apply GPT-5 overlays to non-GPT-5 models", () => {
    expect(
      resolveGpt5SystemPromptContribution({
        providerId: OPENAI_CONTRACT_PROVIDER_ID,
        modelId: NON_GPT5_CONTRACT_MODEL_ID,
      }),
    ).toBeUndefined();
  });
});

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