Multi-format LLM API compliance testing tool — validates endpoints against OpenAI Chat, Open Responses, Anthropic, and Google GenAI specs.
Project description
llm-comply
Multi-format LLM API compliance testing tool — validates endpoints against official specs for OpenAI Chat Completions, Open Responses, Anthropic Messages, and Google GenAI.
Install
pip install llm-comply
# For colored terminal output:
pip install llm-comply[rich]
Quick Start
# Open Responses (default)
llm-comply -u https://api.openai.com/v1 -k $OPENAI_API_KEY -m gpt-4o-mini
# OpenAI Chat Completions
llm-comply --format openai-chat -u https://api.openai.com/v1 -k $OPENAI_API_KEY -m gpt-4o-mini
# Anthropic Messages
llm-comply --format anthropic -u https://api.anthropic.com/v1 -k $KEY -m claude-haiku-4-5 \
--auth-header x-api-key --no-bearer -H anthropic-version:2023-06-01
# Google GenAI
llm-comply --format google-genai -u https://generativelanguage.googleapis.com -k $KEY \
-m gemini-2.5-flash --auth-header x-goog-api-key --no-bearer
Options
-u, --base-url URL API base URL (required)
-k, --api-key KEY API key (or set OPENRESPONSES_API_KEY env)
-m, --model MODEL Model name (default: gpt-4o-mini)
--format FORMAT API format: open-responses, openai-chat, anthropic, google-genai
-f, --filter IDS Comma-separated test IDs to run
-i, --ignore PATTERNS Ignore errors matching substrings (e.g. refusal,verbosity)
-H, --header K:V Extra headers (e.g. anthropic-version:2023-06-01)
--auth-header NAME Auth header name (default: Authorization)
--no-bearer Don't prepend "Bearer " to API key
-v, --verbose Show request/response on failure
--json JSON output for CI
--list List available test IDs
Test Coverage
| Format | Tests | What's Validated |
|---|---|---|
| Open Responses | 12 | Schema + semantic (lifecycle, phases, compaction) |
| OpenAI Chat | 8 | Schema + semantic (choices, finish_reason, delta) |
| Anthropic Messages | 8 | Schema + semantic (content blocks, stop_reason) |
| Google GenAI | 8 | Semantic only (candidates, parts, finishReason) |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_comply-0.1.0.tar.gz.
File metadata
- Download URL: llm_comply-0.1.0.tar.gz
- Upload date:
- Size: 358.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a623d2c476566cb04bedd0c83b2f557d8aa4e17146f2ece4639fc7daeeae761
|
|
| MD5 |
7ad4036a9e102a6a9b4c3a982dafab44
|
|
| BLAKE2b-256 |
868512212d95adde752fbcdd83c3bfdbd24ef582541b0d4f7f6613a0daa663ea
|
Provenance
The following attestation bundles were made for llm_comply-0.1.0.tar.gz:
Publisher:
release.yml on Oaklight/llm-comply
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_comply-0.1.0.tar.gz -
Subject digest:
0a623d2c476566cb04bedd0c83b2f557d8aa4e17146f2ece4639fc7daeeae761 - Sigstore transparency entry: 2306089949
- Sigstore integration time:
-
Permalink:
Oaklight/llm-comply@bb1220c1ce7de1c1451eefd427c4f8f137a621f3 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Oaklight
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bb1220c1ce7de1c1451eefd427c4f8f137a621f3 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file llm_comply-0.1.0-py3-none-any.whl.
File metadata
- Download URL: llm_comply-0.1.0-py3-none-any.whl
- Upload date:
- Size: 368.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9784db1f3a95add42e795ec41517f2b5481cfc496f4a7117d9c61bbda30e325e
|
|
| MD5 |
9c8233ee43e8fd49de6f91a6eacb7172
|
|
| BLAKE2b-256 |
91660d51b24b21603aa4e914a9c741ed4d343b31aac45e6014f031884aa60a60
|
Provenance
The following attestation bundles were made for llm_comply-0.1.0-py3-none-any.whl:
Publisher:
release.yml on Oaklight/llm-comply
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_comply-0.1.0-py3-none-any.whl -
Subject digest:
9784db1f3a95add42e795ec41517f2b5481cfc496f4a7117d9c61bbda30e325e - Sigstore transparency entry: 2306089986
- Sigstore integration time:
-
Permalink:
Oaklight/llm-comply@bb1220c1ce7de1c1451eefd427c4f8f137a621f3 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Oaklight
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bb1220c1ce7de1c1451eefd427c4f8f137a621f3 -
Trigger Event:
workflow_dispatch
-
Statement type: