Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/test-cases/agents/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ import {
checkOutputTokensReasoning,
checkInputMessagesSchema,
} from "../checks.js";
import {
checkInputMessages,
checkOutputMessages,
checkSystemInstructions,
} from "../otel-checks.js";

export const basicAgentTest: TestDefinition = {
name: "Basic Agent Test",
Expand Down Expand Up @@ -46,6 +51,10 @@ export const basicAgentTest: TestDefinition = {
checkInputMessagesSchema,
checkInputTokensCached,
checkOutputTokensReasoning,
// OTel-aligned checks (soft failure if not migrated)
checkInputMessages,
checkOutputMessages,
checkSystemInstructions,
],
};

Expand Down
7 changes: 7 additions & 0 deletions src/test-cases/agents/long-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ import {
checkAgentHierarchy,
checkInputMessagesSchema,
} from "../checks.js";
import {
checkInputMessages,
checkOutputMessages,
} from "../otel-checks.js";

// Generate a long message that exceeds 20KB
// We'll repeat a pattern to create predictable content
Expand Down Expand Up @@ -76,6 +80,9 @@ export const longInputAgentTest: TestDefinition = {
checkTrimmingMetadata,
checkAgentHierarchy,
checkInputMessagesSchema,
// OTel-aligned checks (soft failure if not migrated)
checkInputMessages,
checkOutputMessages,
],
};

Expand Down
23 changes: 23 additions & 0 deletions src/test-cases/agents/tool-call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ import {
checkResponseToolCalls,
checkInputMessagesSchema,
} from "../checks.js";
import {
checkInputMessages,
checkOutputMessages,
checkToolDefinitions,
checkToolCallArguments,
checkToolCallResult,
checkToolCallsNewFormat,
checkOutputMessagesToolCalls,
} from "../otel-checks.js";

export const toolCallAgentTest: TestDefinition = {
name: "Tool Call Agent Test",
Expand Down Expand Up @@ -117,6 +126,20 @@ export const toolCallAgentTest: TestDefinition = {
checkInputMessagesSchema,
checkInputTokensCached,
checkOutputTokensReasoning,
// OTel-aligned checks (soft failure if not migrated)
checkInputMessages,
checkOutputMessages,
checkToolDefinitions,
checkToolCallArguments,
checkToolCallResult,
checkToolCallsNewFormat([
{ name: "add", input: { a: 3, b: 5 }, output: 8 },
{ name: "multiply", input: { a: 8, b: 4 }, output: 32 },
]),
checkOutputMessagesToolCalls([
{ name: "add", arguments: { a: 3, b: 5 } },
{ name: "multiply", arguments: { a: 8, b: 4 } },
]),
],
};

Expand Down
15 changes: 15 additions & 0 deletions src/test-cases/agents/tool-error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ import {
checkAvailableTools,
checkResponseToolCalls,
} from "../checks.js";
import {
checkInputMessages,
checkOutputMessages,
checkToolDefinitions,
checkToolCallArguments,
checkOutputMessagesToolCalls,
} from "../otel-checks.js";
import { extractGenAISpans, findToolSpans } from "../utils.js";

/**
Expand Down Expand Up @@ -110,6 +117,14 @@ export const toolErrorAgentTest: TestDefinition = {
]),
checkInputMessagesSchema,
checkToolErrorSpan,
// OTel-aligned checks (soft failure if not migrated)
checkInputMessages,
checkOutputMessages,
checkToolDefinitions,
checkToolCallArguments,
checkOutputMessagesToolCalls([
{ name: "read_file", arguments: { path: "/nonexistent/file.txt" } },
]),
],
};

Expand Down
9 changes: 9 additions & 0 deletions src/test-cases/agents/vision.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ import {
checkInputMessagesSchema,
checkBinaryRedaction,
} from "../checks.js";
import {
checkInputMessages,
checkOutputMessages,
checkSystemInstructions,
} from "../otel-checks.js";

// Small 10x10 red PNG image encoded as base64
const TEST_IMAGE_BASE64 =
Expand Down Expand Up @@ -66,6 +71,10 @@ export const visionAgentTest: TestDefinition = {
checkAgentHierarchy,
checkInputMessagesSchema,
checkBinaryRedaction,
// OTel-aligned checks (soft failure if not migrated)
checkInputMessages,
checkOutputMessages,
checkSystemInstructions,
],
};

Expand Down
9 changes: 9 additions & 0 deletions src/test-cases/llm/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ import {
checkOutputTokensReasoning,
checkInputMessagesSchema,
} from "../checks.js";
import {
checkInputMessages,
checkOutputMessages,
checkSystemInstructions,
} from "../otel-checks.js";

export const basicLLMTest: TestDefinition = {
name: "Basic LLM Test",
Expand All @@ -37,6 +42,10 @@ export const basicLLMTest: TestDefinition = {
checkInputMessagesSchema,
checkInputTokensCached,
checkOutputTokensReasoning,
// OTel-aligned checks (soft failure if not migrated)
checkInputMessages,
checkOutputMessages,
checkSystemInstructions,
],
};

Expand Down
9 changes: 9 additions & 0 deletions src/test-cases/llm/long-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ import {
checkTrimmingMetadata,
checkInputMessagesSchema,
} from "../checks.js";
import {
checkInputMessages,
checkOutputMessages,
checkSystemInstructions,
} from "../otel-checks.js";

// Generate a long message that exceeds 20KB
// We'll repeat a pattern to create predictable content
Expand Down Expand Up @@ -53,6 +58,10 @@ export const longInputLLMTest: TestDefinition = {
checkMessageTrimming,
checkTrimmingMetadata,
checkInputMessagesSchema,
// OTel-aligned checks (soft failure if not migrated)
checkInputMessages,
checkOutputMessages,
checkSystemInstructions,
],
};

Expand Down
9 changes: 9 additions & 0 deletions src/test-cases/llm/multi-turn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ import {
checkOutputTokensReasoning,
checkInputMessagesSchema,
} from "../checks.js";
import {
checkInputMessages,
checkOutputMessages,
checkSystemInstructions,
} from "../otel-checks.js";
import { extractGenAISpans, skipIf } from "../utils.js";

/**
Expand Down Expand Up @@ -90,6 +95,10 @@ export const multiTurnLLMTest: TestDefinition = {
checkInputMessagesSchema,
checkInputTokensCached,
checkOutputTokensReasoning,
// OTel-aligned checks (soft failure if not migrated)
checkInputMessages,
checkOutputMessages,
checkSystemInstructions,
],
};

Expand Down
9 changes: 9 additions & 0 deletions src/test-cases/llm/vision.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ import {
checkInputMessagesSchema,
checkBinaryRedaction,
} from "../checks.js";
import {
checkInputMessages,
checkOutputMessages,
checkSystemInstructions,
} from "../otel-checks.js";

// Small 10x10 red PNG image encoded as base64
const TEST_IMAGE_BASE64 =
Expand Down Expand Up @@ -54,6 +59,10 @@ export const visionLLMTest: TestDefinition = {
checkValidTokenUsage,
checkInputMessagesSchema,
checkBinaryRedaction,
// OTel-aligned checks (soft failure if not migrated)
checkInputMessages,
checkOutputMessages,
checkSystemInstructions,
],
};

Expand Down
Loading
Loading