space-evals-client-openai
OpenAI client plugin for space-evals. Lets you use OpenAI models (GPT-4o, GPT-4, etc.) as the target, customer, or judge in your space-evals test suite.
Installation
pip install space-evals-client-openai
This installs the core space-evals package and the openai SDK as dependencies.
Setup
Set your API key:
export OPENAI_API_KEY=sk-...
Or use a custom env var name in your config (see below).
Usage
Via config file
Add provider: openai to any client role in your space-evals.yaml:
clients:
target:
provider: openai
model: gpt-4o
customer:
provider: openai
model: gpt-4o-mini
judge:
provider: openai
model: gpt-4o
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("openai", model="gpt-4o")
result = asyncio.run(run_tests(
path="./tests/",
target_client=target,
))
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
provider |
string | -- | Must be "openai" |
model |
string | -- | Model ID (e.g. gpt-4o, gpt-4o-mini, gpt-4-turbo) |
api_key_env |
string | OPENAI_API_KEY |
Env var containing your API key |
params |
object | {} |
Extra parameters passed to the OpenAI API (e.g. temperature, max_tokens) |
Example with extra params
clients:
target:
provider: openai
model: gpt-4o
api_key_env: MY_OPENAI_KEY
params:
temperature: 0
max_tokens: 2048
What this plugin does
- Translates space-evals's
Messageformat to OpenAI's chat completions API - Extracts tool calls from responses into space-evals's
ToolCallformat - Handles system prompts (used by the customer and judge roles)
- Lazy-loads the OpenAI SDK on first use
Requirements
- Python >= 3.11
space-evals>= 0.1.0openai>= 1.0OPENAI_API_KEYenvironment variable (or custom viaapi_key_env)
License
MIT
Metadata
Release files for space-evals-client-openai 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 | Provenance | Actions |
|---|---|---|---|---|
| space_evals_client_openai-0.2.0.tar.gz | 4.4 kB | With provenance | Details for space_evals_client_openai-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| space_evals_client_openai-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for space_evals_client_openai-0.2.0-py3-none-any.whl |
Total release size: 8.3 kB
Release files / space_evals_client_openai-0.2.0.tar.gz
| Download URL | space_evals_client_openai-0.2.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3110b1272b2b94952111c48ab2c4cf2d1a51413cc9810a29b1ff4ec6c6316d8a
|
|
BLAKE2b-256 checksum How to use checksums |
189ed9b0e992e1278af662a11d99412628210b5468947fb246fc63478798422d
|
| 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_openai-0.2.0-py3-none-any.whl
| Download URL | space_evals_client_openai-0.2.0-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4ca4e0ec26019aced743beb83a143062ea2f63e45976df1459f45a02629da6b
|
|
BLAKE2b-256 checksum How to use checksums |
f568d9cf13b510b4a6854dc86ec91c0f35db87733cf457c783b9106b0bc14245
|
| 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 logSecurity for space-evals-client-openai 0.2.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for space_evals_client_openai-0.2.0.tar.gz
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 logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.