space-evals-client-anthropic
Anthropic client plugin for space-evals. Lets you use Anthropic models (Claude Sonnet, Claude Opus, Claude Haiku, etc.) as the target, customer, or judge in your space-evals test suite.
Installation
pip install space-evals-client-anthropic
This installs the core space-evals package and the anthropic SDK as dependencies.
Setup
Set your API key:
export ANTHROPIC_API_KEY=sk-ant-...
Or use a custom env var name in your config (see below).
Usage
Via config file
Add provider: anthropic to any client role in your space-evals.yaml:
clients:
target:
provider: anthropic
model: claude-sonnet-4-20250514
customer:
provider: anthropic
model: claude-haiku-4-5-20251001
judge:
provider: anthropic
model: claude-sonnet-4-20250514
Then run your tests:
space-evals run ./tests/
Via programmatic API
import asyncio
from space_evals.engine import run_tests
from space_evals.clients.base import get_client
target = get_client("anthropic", model="claude-sonnet-4-20250514")
result = asyncio.run(run_tests(
path="./tests/",
target_client=target,
))
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
provider |
string | -- | Must be "anthropic" |
model |
string | -- | Model ID (e.g. claude-sonnet-4-20250514, claude-opus-4-20250514, claude-haiku-4-5-20251001) |
api_key_env |
string | ANTHROPIC_API_KEY |
Env var containing your API key |
params |
object | {} |
Extra parameters passed to the Anthropic API (e.g. temperature, max_tokens) |
Example with extra params
clients:
target:
provider: anthropic
model: claude-sonnet-4-20250514
api_key_env: MY_ANTHROPIC_KEY
params:
temperature: 0
max_tokens: 4096
What this plugin does
- Translates space-evals's
Messageformat to Anthropic's messages API - Extracts tool use blocks from responses into space-evals's
ToolCallformat - Handles system prompts via Anthropic's
systemparameter (used by the customer and judge roles) - Lazy-loads the Anthropic SDK on first use
- Defaults
max_tokensto 1024 if not specified
Requirements
- Python >= 3.11
space-evals>= 0.1.0anthropic>= 0.30ANTHROPIC_API_KEYenvironment variable (or custom viaapi_key_env)
License
MIT
Metadata
Release files for space-evals-client-anthropic 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| space_evals_client_anthropic-0.2.0.tar.gz | 4.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| space_evals_client_anthropic-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.9 kB
Release files / space_evals_client_anthropic-0.2.0.tar.gz
| Download URL | space_evals_client_anthropic-0.2.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b5a4b81ba91a102a5a927ff46d1c2672597cc75b0b78743dc665274bfcb7ce5c
|
|
BLAKE2b-256 checksum How to use checksums |
a2bba925716778734d835082ba442ba102283015e4fe2ad54ae2e07df493d980
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 11, 2026.
Transparency logRelease files / space_evals_client_anthropic-0.2.0-py3-none-any.whl
| Download URL | space_evals_client_anthropic-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
519e8b916021d2f80a924a8964b4ff04302cee2d8075f58aecac6fa2860a5720
|
|
BLAKE2b-256 checksum How to use checksums |
9d306e55418b8b9bb20f7d188dda0be60b01b9d0a7ef44e9d0013300dbb9b5b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 11, 2026.
Transparency log