diff --git a/packages/cli/script/eval-skill.ts b/packages/cli/script/eval-skill.ts index e9b105391..2d167b978 100644 --- a/packages/cli/script/eval-skill.ts +++ b/packages/cli/script/eval-skill.ts @@ -2,23 +2,23 @@ /** * Evaluate SKILL.md effectiveness by testing LLM command planning. * - * Sends test prompts to agent models (Opus 4.6 + Sonnet 4.6) with SKILL.md + * Sends test prompts to agent models (Sonnet 5 + GPT-5.6 Luna) with SKILL.md * as context, then grades the planned commands on efficiency criteria. * Commands are verified against the real CLI binary (via `-h`) to ground * the LLM judge with empirical results. * * Requires an eval provider credential: OPENROUTER_API_KEY (preferred) or * ANTHROPIC_API_KEY. OpenRouter is used when its key is set; default model IDs - * are OpenRouter slugs (e.g. `anthropic/claude-sonnet-4.6`). + * are OpenRouter slugs (e.g. `anthropic/claude-sonnet-5`). * * Usage: * tsx script/eval-skill.ts - * EVAL_AGENT_MODELS=anthropic/claude-sonnet-4.6 tsx script/eval-skill.ts + * EVAL_AGENT_MODELS=anthropic/claude-sonnet-5 tsx script/eval-skill.ts * * Environment variables: * OPENROUTER_API_KEY - OpenRouter API key (preferred) * ANTHROPIC_API_KEY - Anthropic API key (fallback when no OpenRouter key) - * EVAL_AGENT_MODELS - Comma-separated model IDs (default: sonnet-4.6, opus-4.6) + * EVAL_AGENT_MODELS - Comma-separated model IDs (default: sonnet-5, gpt-5.6-luna) * EVAL_JUDGE_MODEL - Judge model ID (default: haiku-4.5) * EVAL_THRESHOLD - Minimum pass rate 0-1 (default: 0.75) * SENTRY_CLI_BINARY - Path to pre-built binary (falls back to tsx src/bin.ts) diff --git a/packages/cli/test/e2e/skill-eval.test.ts b/packages/cli/test/e2e/skill-eval.test.ts index 0d24d6f0f..3a4c005ca 100644 --- a/packages/cli/test/e2e/skill-eval.test.ts +++ b/packages/cli/test/e2e/skill-eval.test.ts @@ -22,10 +22,10 @@ import type { CaseResult, TestCase } from "../skill-eval/helpers/types.js"; const SKILL_PATH = "plugins/sentry-cli/skills/sentry-cli/SKILL.md"; const DEFAULT_THRESHOLD = 0.75; -/** Models under test — env-overridable, defaults to sonnet + opus. */ +/** Models under test — env-overridable, defaults to sonnet-5 + gpt-5.6-luna. */ const AGENT_MODELS = process.env.EVAL_AGENT_MODELS ? process.env.EVAL_AGENT_MODELS.split(",").map((m) => m.trim()) - : ["anthropic/claude-sonnet-4.6", "anthropic/claude-opus-4.6"]; + : ["anthropic/claude-sonnet-5", "openai/gpt-5.6-luna"]; const provider = resolveEvalProvider(); diff --git a/packages/cli/test/eval-common/anthropic-client.ts b/packages/cli/test/eval-common/anthropic-client.ts index 5c1b8ea50..373e4a62d 100644 --- a/packages/cli/test/eval-common/anthropic-client.ts +++ b/packages/cli/test/eval-common/anthropic-client.ts @@ -137,6 +137,17 @@ async function anthropicChat({ messages, maxTokens, }: ChatArgs): Promise { + // Anthropic direct path only supports Anthropic models; strip the + // OpenRouter-style `anthropic/` prefix and reject anything else. + let anthropicModel = model; + if (model.startsWith("anthropic/")) { + anthropicModel = model.slice("anthropic/".length); + } else if (model.startsWith("openai/")) { + throw new Error( + `Anthropic direct provider cannot serve OpenAI model "${model}"` + ); + } + const { default: Anthropic } = await import("@anthropic-ai/sdk"); const client = new Anthropic({ apiKey, baseURL }); @@ -146,7 +157,7 @@ async function anthropicChat({ .map((m) => ({ role: "user" as const, content: m.content })); const response = await client.messages.create({ - model, + model: anthropicModel, max_tokens: maxTokens, system, messages: userMsgs, diff --git a/packages/cli/test/skill-eval/helpers/llm-client.ts b/packages/cli/test/skill-eval/helpers/llm-client.ts index 264fac13f..23e7b66bb 100644 --- a/packages/cli/test/skill-eval/helpers/llm-client.ts +++ b/packages/cli/test/skill-eval/helpers/llm-client.ts @@ -13,8 +13,8 @@ import type { /** Default agent models — the target models for the skill (OpenRouter slugs). */ export const DEFAULT_AGENT_MODELS = [ - "anthropic/claude-sonnet-4.6", - "anthropic/claude-opus-4.6", + "anthropic/claude-sonnet-5", + "openai/gpt-5.6-luna", ]; /** Default judge model — cheap and fast, just needs to grade command plans. */