Tests/benchmarks third-party LLM endpoints (OpenAI/Anthropic-compatible) for availability, fidelity, speed, concurrency, protocol compliance, and quality regression. Use when onboarding a provider or debugging endpoint issues.
Ships in llm-eval-harness. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Give this skill an endpoint (base_url + model + an API key in an env var) and it
measures whether the endpoint actually works and whether the model is fast, stable,
protocol-correct, and good enough — instead of trusting the vendor's headline numbers.
Choose from the following evaluation dimensions:
| Dimension | Script | Answers |
|---|---|---|
| Availability | scripts/availability_probe.py | which model IDs work here, with explicit error classification |
| Request fidelity | scripts/fidelity_probe.py | do system prompt / tools / history actually REACH the model? |
| Speed | scripts/speed_probe.py | TTFT + sustained decode tok/s, thinking-aware |
| Concurrency / stability | scripts/concurrency_probe.py | success rate, p50/p90 latency, where it breaks |
| Protocol compliance | scripts/protocol_probe.py | Anthropic thinking generation and history replay, or paired JSON/SSE tool arguments with a union schema (see Dimension 3) |
| Quality / use-case regression | scripts/usecase_runner.py + blind judges | does it pass your accumulated cases? |
Route from what the user is actually doing:
--check history-replay specifically — this symptom is the
generation check passing while history-replay silently doesn't; don't stop at generation--output, then follow
references/vendor_evidence_protocol.mdRun only the dimensions that answer the user's question.
Key handling (non-negotiable): every script takes the API key by env-var name
(--key-env MY_KEY), never the key value on the command line — so it stays out of ps,
shell history, and any saved report. Never hardcode a key into a use-case file or a
wrapper. Read references/evaluation_disciplines.md
for the full reasoning behind this and the other disciplines.
Your private data lives outside this bundle. Use-case libraries, model rosters, and
keys belong in ~/.llm-eval/ (or wherever you keep secrets), NOT in this skill directory —
the skill is generic and public; your test suite is yours. See "Use-case library" below.
Machine launchers and interrupted runs: use the paired --result-json / --run-id
interface and the bundled scripts/eval_result.py reader to distinguish completed,
noncompliant, partial, unmeasured, failed and cancelled runs. Read
machine results before integrating a launcher; that
reference owns receipt freshness, typed evidence, exit codes, auth forwarding and
the offline regression command. Keep legacy --output and quality answer artifacts.
Detect what you have, then run the dimensions that apply. For an OpenAI-compatible model:
export MY_KEY=sk-... # the key never appears in a command below
# Speed: real-task throughput + sustained decode ceiling
uv run --with openai python scripts/speed_probe.py \
--base-url https://api.example.com/v1 --model some-model --key-env MY_KEY --mode both
# Concurrency: ramp until it breaks
uv run --with aiohttp python scripts/concurrency_probe.py \
--url https://api.example.com/v1/chat/completions --model some-model --key-env MY_KEY \
--format openai --concurrency 10 20 40 60
If the endpoint is Anthropic-Messages-shaped (/v1/messages), also run the protocol probe
(below). Select the dimensions for the task.
Pass --auth bearer to Anthropic protocol/concurrency probes when the route requires
Authorization instead of x-api-key. The default remains x-api-key and applies to both
protocol generation and history replay. OpenAI concurrency keeps Bearer authentication.
uv run --with aiohttp python scripts/availability_probe.py \
--base-url <base> --key-env <ENV> --format both \
--models model-a vendor/model-b @models.txt --output /tmp/avail.json
response_outcome as answered, refused, empty or unknown;
transport_ok means HTTP response headers arrived, not that a usable answer did.
refused preserves explicit refusal/content-filter markers even when text exists;
it does not establish model/provider unavailability. An empty end_turn remains
cause-unknown; thinking characters alone do not prove token-budget exhaustion.
no-channel means no route for this ID; upstream-error means the upstream failed
this request. Keep the generous default --max-tokens rather than manufacturing
empty replies with a tiny budget. Native stop_reason, finish_reason,
stop_details and refusal are retained when present, including null/empty values.
Exit 1 means at least one probe lacks a usable answer; it is not a service diagnosis.-preview, dated variants, tier names) decide routability. Full traps: disciplines §9.some-model[1m] are frequently a CLI client's own local convention (Claude
Code parses and strips [1m] before the request is ever built — see
claude-switch-models-setup's "Configuring Context Window Size" section for the full
mechanism) — they never appear on the wire. The probe warns when it sees one, but the
discipline is yours: probe the bare model ID the vendor actually documents, not a string
copied out of a Claude Code ANTHROPIC_MODEL env var./v1/models listing is one input, never the verdict — real gateways
route models the listing omits.uv run --with aiohttp python scripts/fidelity_probe.py \
--base-url <base> --model <model> --key-env <ENV> \
--format anthropic --check all --repeat 10 --output /tmp/fidelity.json
system (canary code planted in the system prompt — can the model echo
it back?), tools (full round-trip including returning a tool result and verifying
the final answer uses it), multiturn (plant facts across turns, recall them all),
auth (x-api-key vs Bearer on both protocol endpoints — gateways commonly accept
both on one path and only one on the other, and the wrong-header 401 reads exactly
like a dead key).--repeat (default 10) and a verdict (delivered / intermittent k-of-N /
not-delivered). A clean single-window result is still just that window: re-sample in
another time slice before publishing a number (disciplines §12).uv run --with openai python scripts/speed_probe.py \
--base-url <…/v1> --model <model> --key-env <ENV> --mode both --output /tmp/speed.json
mixed runs representative tasks (what real usage feels like); decode forces one long
output to find the sustained ceiling (the number to compare against a vendor's claim);
both does both.reasoning_content field, but completion_tokens counts it. Collecting only content
while dividing by completion_tokens produces wildly inflated numbers — a real ~750 tok/s
model once measured as 4700 tok/s this way. The script captures both, takes TTFT as the
first token of either kind, and reports completion_tokens / (total − TTFT).uv run --with aiohttp python scripts/concurrency_probe.py \
--url <full endpoint URL> --model <model> --key-env <ENV> \
--format openai|anthropic --concurrency 10 20 40 60 --output /tmp/conc.json
--concurrency levels to ramp and find the ceiling — the level where success
rate drops or latency explodes. A model that's fast single-threaded can still collapse at
modest concurrency (real example: one provider held 50 concurrent at 0.4s while another
dropped requests at just 5 concurrent).trust_env=False) and disables keep-alive
pooling (force_close) — otherwise you measure the proxy's limit or one pinned upstream
replica, not the model. It prints a "concurrency proof" (overlapping request pairs) so you
can confirm requests really ran in parallel.uv run python scripts/protocol_probe.py \
--url <…/v1/messages> --model <model> --key-env <ENV> --check all --repeat 10 --output /tmp/proto.json
/v1/messages compatibility. --check all
(default) runs BOTH sub-checks — they test different code paths and a vendor can pass one
while hard-failing the other:
thinking: {type: enabled} actually produce thinking_delta /
signature_delta SSE events when you request it? (the original check)type: "thinking" block that's already
sitting in a prior assistant turn, when that history is replayed back on a later turn —
exactly what Claude Code and every other agentic client does on every continuation?
(--check history-replay to run just this one)preserve_thinking), which
looked like confirmation. Round 2 was STILL wrong: the probe never left that one reseller, so
it couldn't see that the vendor's own direct/native endpoint handled the "rejected" model fine
— real production traffic proved it. Read §19 before treating any single-reseller-confirmed
result as final; check the vendor's own endpoint or real traffic for the actual channel in
question before writing an "X doesn't support thinking" conclusion into anything.--repeat defaults to 10; generation reports fully-implemented,
intermittent (k/N) or not-implemented; history-replay reports
(accepts-thinking-in-history, rejects-thinking-in-history, inconsistent, or
inconclusive when errors look unrelated to thinking at all). Never conclude from a single
sample.Connection: close per request so a load balancer can't pin all samples to one
replica and hide the real distribution (a real probe saw 0/10 with keep-alive vs 17/90
with close on the same endpoint).When a tool receives invalid arguments only during streaming, run
protocol_probe.py with --check tool-arguments and the same endpoint, model,
and key options. Each repetition sends six requests. Each bracket, digit, or
brace-prefixed release note gets a JSON response and an SSE response with all
other payload parameters held constant. The probe forces a single tool call
with a string | object argument and decodes the assembled SSE fragments.
A matching JSON string paired with invalid assembled SSE JSON is an observed
wire-format difference. Valid JSON with different arguments, missing terminal
events, and transport errors produce distinct observations. A matching
control is required for a stream-only finding. --check all retains the two
thinking checks. For an external report, follow the
vendor evidence protocol.
Collect, then judge independently.
Step 1 — collect the model's answers to your use-case library:
uv run --with openai python scripts/usecase_runner.py \
--base-url <…/v1> --model <model> --key-env <ENV> \
--usecases ~/.llm-eval/usecases.json --output-dir ~/.llm-eval/runs/<model>
Step 2 — judge with independent blind judges (orchestrate inline — do NOT let the model
grade itself). For each answer in the run directory, spawn 3 independent Task agents (or
fewer for a quick pass). Each judge gets ONLY: the prompt, the answer, and the case's
rubric — and is explicitly told it is judging in isolation, with no knowledge of other
judges' scores or any prior evaluation (this prevents anchoring). Then aggregate:
tags): a category where judges
systematically disagree with the rubric is a real weakness — on one real eval, a whole
category scored 12.5% precision and exposed a systematic misclassification that a single
grader would have missed.For the rubric-scoring mechanics (LLM-as-judge thresholds, llm-rubric), you can also
compose with the promptfoo-evaluation skill — point its providers at the same endpoint.
This harness's blind-judge method and promptfoo's rubric assertions are complementary: use
promptfoo for fast per-case pass/fail gating, blind judges for precision on a category you
suspect is weak. Full method: references/quality_blind_judge.md.
Keep it OUTSIDE this bundle (e.g. ~/.llm-eval/usecases.json) so it survives skill updates
and never lands in a public repo. It's a plain JSON list — version it in a private repo to
accumulate a regression suite over time:
[
{"id": "refund-window", "prompt": "A customer asks for a refund 20 days after purchase. Reply as support.",
"rubric": "1.0 if it correctly cites the 30-day refund window; 0.0 if it refuses or invents a different window.",
"tags": ["support", "policy"]},
{"id": "lru-cache", "prompt": "Implement an LRU cache in Python with O(1) get/put.",
"rubric": "1.0 if get and put are both O(1) via dict + doubly linked list and the self-test passes.",
"tags": ["code"]}
]
assets/example_usecases.json is a starter you can copy. Only id and prompt are required;
rubric, expected, and tags make judging sharper.
When the user says "evaluate / benchmark this model", the typical flow is:
/v1/chat/completions) or Anthropic-Messages
(/v1/messages)? Hit GET /v1/models or read the vendor docs; don't assume. This decides
which probes apply (protocol probe is Anthropic-only). Remember the listing is incomplete
evidence either way (disciplines §9).--output JSON to a run directory.For tests that will run repeatedly against a live system — deployment gates, resident canaries, fault-injection mocks, and the monitoring statistics that lie — see references/production_testing_patterns.md.
After a run, offer the natural follow-ups:
Evaluation complete for <model>.
Options:
A) Render an HTML dashboard of the results — compose with a visualization skill (Recommended if sharing)
B) Compare against another model — same probes, side-by-side
C) Add the failing cases to ~/.llm-eval/usecases.json as a permanent regression guard
D) Done — the numbers answer the question
assets/example_usecases.json (opens in a new tab)references/evaluation_disciplines.md (opens in a new tab)references/machine-results.md (opens in a new tab)references/production_testing_patterns.md (opens in a new tab)references/quality_blind_judge.md (opens in a new tab)references/vendor_evidence_protocol.md (opens in a new tab)scripts/availability_probe.py (opens in a new tab)scripts/concurrency_probe.py (opens in a new tab)scripts/eval_result.py (opens in a new tab)scripts/fidelity_probe.py (opens in a new tab)scripts/protocol_probe.py (opens in a new tab)scripts/speed_probe.py (opens in a new tab)scripts/usecase_runner.py (opens in a new tab)tests/test_availability.py (opens in a new tab)tests/test_results.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/llm-eval-harness:llm-eval-harnessfrom llm-eval-harness
npx claudepluginhub daymade/claude-code-skills --plugin llm-eval-harnessOther plugins' skills for the same job