AI API Trust & Cost Transparency SDK — Audit your LLM relay providers
Project description
TruthProbe SDK
AI API Trust & Cost Transparency — Know if your relay provider is honest.
Install
pip install truthprobe
Quick Start
import truthprobe
truthprobe.patch()
# Use OpenAI SDK as normal — TruthProbe monitors in background
from openai import OpenAI
client = OpenAI(api_key="sk-xxx", base_url="https://your-relay.com/v1")
response = client.chat.completions.create(
model="claude-sonnet-4-6",
messages=[{"role": "user", "content": "Hello"}]
)
# After each response, you'll see:
# ✓ ¥0.032 │ claude-sonnet-4-6 │ 1.2s
CLI
truthprobe report # Full audit report
truthprobe balance # Check provider balances
truthprobe score # Current trust score
Configuration
import truthprobe
truthprobe.init(
providers=[
{"name": "RelayA", "base_url": "https://relay-a.com/v1", "key": "sk-aaa"},
{"name": "RelayB", "base_url": "https://relay-b.com/v1", "key": "sk-bbb"},
],
lang="zh", # "zh" or "en" (auto-detected by default)
alert_balance_threshold=50, # Alert when balance < ¥50
currency_symbol="¥",
)
truthprobe.patch()
Silent Mode
truthprobe.patch(quiet=True) # No output at all, just records
truthprobe.patch(verbose=False) # No per-request line, but alerts still fire
What It Detects
- Model downgrade: Relay claims to use GPT-4o but serves GPT-4o-mini
- Timing anomalies: Response too fast for the claimed model
- Text quality drops: Vocabulary richness / reasoning depth below model baseline
Alerts (automatic, no config needed)
- Balance danger: When any provider balance < threshold
- Trust collapse: When suspicious rate > 30% in recent 20 requests
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
truthprobe-0.1.0.tar.gz
(11.6 kB
view details)
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 truthprobe-0.1.0.tar.gz.
File metadata
- Download URL: truthprobe-0.1.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f0728f147ab00943e5a8838ea765e10584d39fb6f0d1d26837bf44f7ccc227d
|
|
| MD5 |
ef8c2212b45b13588fa063e72212437b
|
|
| BLAKE2b-256 |
3475a2b4257399d5a1aef0eaf3cc9848591b08ae71b4e397eb64d676c17924bc
|
File details
Details for the file truthprobe-0.1.0-py3-none-any.whl.
File metadata
- Download URL: truthprobe-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69ca3d211fbe8f97fed6efd42bd5d7eb7a414e337db6d29904b31fcf3cab49a8
|
|
| MD5 |
22b5de4e045fc790044d5a76c5dcb0e0
|
|
| BLAKE2b-256 |
06f5cf2a81321bf184fdbe150f21435d6979744946e32bec069d13f116927199
|