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
5 changes: 5 additions & 0 deletions core/src/providers/factory.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Suppress Vercel AI SDK spec-compatibility warnings — @ai-sdk/openai-compatible
// still implements the older provider spec than the installed `ai` major, and
// the warning fires once per model instance created below; it's not actionable.
(globalThis as Record<string, unknown>).AI_SDK_LOG_WARNINGS = false;

import type { LanguageModel } from "ai";
import { createOpenAI } from "@ai-sdk/openai";
import { createAnthropic } from "@ai-sdk/anthropic";
Expand Down
2 changes: 0 additions & 2 deletions core/tests/evaluators.judge.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
(globalThis as Record<string, unknown>).AI_SDK_LOG_WARNINGS = false;

/**
* Evaluator judge smoke tests.
*
Expand Down
4 changes: 0 additions & 4 deletions runners/cli/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Suppress Vercel AI SDK v1/v2 spec compatibility warnings — these fire for
// custom/openai-compatible providers and are not actionable by the user.
(globalThis as Record<string, unknown>).AI_SDK_LOG_WARNINGS = false;

import { readFileSync } from "node:fs";
import { config as loadDotenv } from "dotenv";
import { Command } from "commander";
Expand Down
7 changes: 5 additions & 2 deletions runners/sdk/src/catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ import type { SuiteInfo, EvaluatorInfo, ListEvaluatorsOptions } from "./types.js
* @example
* ```typescript
* const suites = await listSuites();
* const mcpSuites = await listSuites({ kind: "mcp" });
* // [{ id: "owasp-llm-top10", name: "OWASP LLM Top 10", evaluatorCount: 10 }, ...]
* ```
*/
export async function listSuites(): Promise<SuiteInfo[]> {
const catalog = await loadSkillCatalog();
export async function listSuites(options?: ListEvaluatorsOptions): Promise<SuiteInfo[]> {
const kind = options?.kind ?? "agent";

const catalog = kind === "mcp" ? await loadCatalog() : await loadSkillCatalog();

return catalog.suites.map((suite) => ({
id: suite.id,
Expand Down
14 changes: 14 additions & 0 deletions runners/sdk/tests/catalog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@ describe("SDK catalog", () => {
);
});

test("listSuites respects kind option", async () => {
const agentSuites = await listSuites({ kind: "agent" });
const mcpSuites = await listSuites({ kind: "mcp" });

assert.ok(agentSuites.length > 0, "should have agent suites");
assert.ok(mcpSuites.length > 0, "should have mcp suites");

const agentIds = new Set(agentSuites.map((s) => s.id));
const mcpIds = new Set(mcpSuites.map((s) => s.id));

assert.ok(agentIds.size > 0);
assert.ok(mcpIds.size > 0);
});

test("listEvaluators returns array of evaluators", async () => {
const evaluators = await listEvaluators();

Expand Down
Loading