LLM regression testing — route your LLM calls through Regent's proxy
Project description
Regent SDK
pip install regent-sdk
Usage
import regent
regent.init(api_key="your-regent-api-key")
# All OpenAI/Anthropic clients instantiated after this call
# will automatically route through Regent's proxy.
# Must be called before importing or instantiating OpenAI/Anthropic clients.
from openai import OpenAI
client = OpenAI() # automatically proxied
Local development
regent.init(api_key="your-regent-api-key", proxy_url="http://localhost:8000")
What gets proxied
Only LLM calls made without an explicit api_key argument are routed through Regent. If you pass your own api_key when constructing a client, the SDK leaves that client untouched — this is intentional so auxiliary clients (e.g. embeddings, sidecar services) are never accidentally rerouted.
OpenAI() # proxied — Regent injects base_url + api_key
OpenAI(api_key="sk-...") # not proxied — your key, your endpoint
Privacy
Regent only proxies traffic from your test runs (GitHub Actions / CI). We do not intercept or touch your production traffic. If REGENT_ENABLED is not set to "true", regent.init() is a no-op and nothing is patched.
Publishing to PyPI
# First time setup
pip install hatch twine
# Build
cd sdk/python
hatch build
# Publish (prompts for PyPI credentials)
twine upload dist/*
# For subsequent releases — bump version in pyproject.toml, then:
hatch build
twine upload dist/*
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 regent_sdk-0.1.7.tar.gz.
File metadata
- Download URL: regent_sdk-0.1.7.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc0ffe64bcd3c2e7666da816e0d4cc9556fef62c6e724133d275675427427c64
|
|
| MD5 |
297af565288b24891c8f61f1488c0f6d
|
|
| BLAKE2b-256 |
d9340be5c8e97a3ad48e99d6cc8cdf3b9a8ff18eb9cd34ef54e7b44f3dcaf039
|
File details
Details for the file regent_sdk-0.1.7-py3-none-any.whl.
File metadata
- Download URL: regent_sdk-0.1.7-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3b8f614e72c547247c167e769a80cac37a3565e71ca1c14b2d92938fded6b90
|
|
| MD5 |
dbe67f9d66bbeb24dc2d89c91bc42ce9
|
|
| BLAKE2b-256 |
09b47bb796c6505872d7602d3d5dc22e44193fb2193cdbaaa55371f87e7e257d
|