From 299bf7861b455bcbfce6774622769c62a8df9477 Mon Sep 17 00:00:00 2001 From: Jithin Date: Tue, 30 Jun 2026 15:37:21 +0530 Subject: [PATCH 1/2] feat: support listing mcp suites from the sdk --- runners/sdk/src/catalog.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/runners/sdk/src/catalog.ts b/runners/sdk/src/catalog.ts index 74a6d7eb..cf38083c 100644 --- a/runners/sdk/src/catalog.ts +++ b/runners/sdk/src/catalog.ts @@ -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 { - const catalog = await loadSkillCatalog(); +export async function listSuites(options?: ListEvaluatorsOptions): Promise { + const kind = options?.kind ?? "agent"; + + const catalog = kind === "mcp" ? await loadCatalog() : await loadSkillCatalog(); return catalog.suites.map((suite) => ({ id: suite.id, From a6510a1953c148021c57102b83f39b09ab0cb5a7 Mon Sep 17 00:00:00 2001 From: Jithin Date: Wed, 1 Jul 2026 16:01:05 +0530 Subject: [PATCH 2/2] test: add listsuites kind coverage and centralize ai sdk warning suppression --- core/src/providers/factory.ts | 5 +++++ core/tests/evaluators.judge.test.ts | 2 -- runners/cli/src/index.ts | 4 ---- runners/sdk/tests/catalog.test.ts | 14 ++++++++++++++ 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/core/src/providers/factory.ts b/core/src/providers/factory.ts index a7ac90c4..51e95412 100644 --- a/core/src/providers/factory.ts +++ b/core/src/providers/factory.ts @@ -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).AI_SDK_LOG_WARNINGS = false; + import type { LanguageModel } from "ai"; import { createOpenAI } from "@ai-sdk/openai"; import { createAnthropic } from "@ai-sdk/anthropic"; diff --git a/core/tests/evaluators.judge.test.ts b/core/tests/evaluators.judge.test.ts index 2e3f1b58..65672d69 100644 --- a/core/tests/evaluators.judge.test.ts +++ b/core/tests/evaluators.judge.test.ts @@ -1,5 +1,3 @@ -(globalThis as Record).AI_SDK_LOG_WARNINGS = false; - /** * Evaluator judge smoke tests. * diff --git a/runners/cli/src/index.ts b/runners/cli/src/index.ts index 61e5f356..6d80cc3b 100644 --- a/runners/cli/src/index.ts +++ b/runners/cli/src/index.ts @@ -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).AI_SDK_LOG_WARNINGS = false; - import { readFileSync } from "node:fs"; import { config as loadDotenv } from "dotenv"; import { Command } from "commander"; diff --git a/runners/sdk/tests/catalog.test.ts b/runners/sdk/tests/catalog.test.ts index 18430dec..6e4fe8e7 100644 --- a/runners/sdk/tests/catalog.test.ts +++ b/runners/sdk/tests/catalog.test.ts @@ -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();