Skip to main content

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

regent_sdk-0.1.4.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

regent_sdk-0.1.4-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file regent_sdk-0.1.4.tar.gz.

File metadata

  • Download URL: regent_sdk-0.1.4.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for regent_sdk-0.1.4.tar.gz
Algorithm Hash digest
SHA256 d4ebba5a36a1c91479cd31b87dc723ee17607f307920dfd9d2571d51ac2a7e5c
MD5 dbcd918c0e3e0ca1856907727cdc246e
BLAKE2b-256 646327551fc445691a9666361bf70244fc3928dac1eeb9626f14e3fcbe9c10aa

See more details on using hashes here.

File details

Details for the file regent_sdk-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: regent_sdk-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for regent_sdk-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ebba7b58dafa5a39bedc0634edaabdc6332c26a5c0eb8f28252910e7df01184a
MD5 380cf42af252ed93348c309c1a7db54a
BLAKE2b-256 65c808b9efb4b128eae7f263701c71daa9904954c713e5a79be90a5d21b8a80b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page