aivyuh-finops
Transparent cost telemetry for Anthropic and OpenAI Python clients. Part of the V7 AI FinOps platform.
Wrap your existing AI SDK client in one line — aivyuh-finops captures model, tokens, cost, and latency metadata and sends it to the V7 backend. It never reads or stores prompt or response content.
Install
pip install aivyuh-finops
With provider extras:
pip install aivyuh-finops[anthropic] # includes anthropic SDK
pip install aivyuh-finops[openai] # includes openai SDK
pip install aivyuh-finops[all] # both
Quickstart
Anthropic
from anthropic import Anthropic
from aivyuh_finops import wrap_anthropic
client = wrap_anthropic(Anthropic(), {
"telemetry_endpoint": "https://finops-api.aivyuh.com/telemetry",
"customer_id": "cust-123",
"project": "my-app",
"tags": {"feature": "chat", "team": "product"},
})
# Use the client exactly as before — all types are preserved
message = client.messages.create(
model="claude-sonnet-4-6-20260320",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello, Claude!"}],
)
OpenAI
from openai import OpenAI
from aivyuh_finops import wrap_openai
client = wrap_openai(OpenAI(), {
"telemetry_endpoint": "https://finops-api.aivyuh.com/telemetry",
"customer_id": "cust-123",
"project": "my-app",
"tags": {"feature": "search", "team": "platform"},
})
# Use the client exactly as before
completion = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello, GPT!"}],
)
Configuration
| Option | Type | Required | Description |
|---|---|---|---|
telemetry_endpoint |
str |
Yes | V7 telemetry ingest URL (https://finops-api.aivyuh.com/telemetry) |
customer_id |
str |
Yes | Your customer ID for cost attribution |
project |
str |
No | Project name for grouping costs |
tags |
dict[str, str] |
No | Custom key-value tags attached to every request |
disable_telemetry |
bool |
No | Set True to disable (useful in tests) |
Production API Endpoint
https://finops-api.aivyuh.com/telemetry
POST telemetry payloads are accepted with a 202 Accepted response. The endpoint is fire-and-forget — if unreachable, your application is unaffected.
How It Works
wrap_anthropic()/wrap_openai()monkey-patchesmessages.create()orchat.completions.create().- After each successful call, it extracts usage metadata (model, tokens, latency) and estimates cost.
- A background thread sends the telemetry payload via HTTP POST — errors are silently swallowed.
- Your original response is returned untouched. Zero external dependencies (uses
urllib+threading).
Requirements
- Python >= 3.10
anthropic>= 0.40.0 and/oropenai>= 1.50.0 (optional peer dependencies)
License
MIT
Metadata
Release files for aivyuh-finops 0.1.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 | |
|---|---|---|---|
| aivyuh_finops-0.1.0.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aivyuh_finops-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.9 kB
Release files / aivyuh_finops-0.1.0.tar.gz
| Download URL | aivyuh_finops-0.1.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6a4fa22b8ed2248381270f119b4f56c53ff626bc39e45655f607cd238eafd3fc
|
|
BLAKE2b-256 checksum How to use checksums |
8ca41b7c45339eaeeb46d2c310fd3b57ddd6f9c8a7a0070283d65d2c9f3c9249
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / aivyuh_finops-0.1.0-py3-none-any.whl
| Download URL | aivyuh_finops-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
22d1aa1d806912f73bf1f0def9558cf4279f8e1624d6ad8ddd1d5e54ae38e0a2
|
|
BLAKE2b-256 checksum How to use checksums |
f19b5b323205b63a2b00e1bf580b6a8ef9c0046944d3ba620dcd4a101a159e18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|