Vantage LiteLLM Callback
Release notes
Unreleased
Success-event fallback preserves cache-aware response usage when the standard logging payload only has gross prompt totals. Metadata sources are merged so model-only metadata does not hide available team, user, or request labels; earlier sources still win conflicting values.
Fixed an issue where streamed OpenAI and Azure OpenAI Responses API requests, including Codex requests, could report zero tokens when LiteLLM supplied Pydantic response objects. Also corrected handling of incomplete Responses events and preserved final chat token usage received after a finish marker.
Required Vantage collector
The callback works with the Vantage LiteLLM collector. To set up the Vantage LiteLLM integration, install both components:
- Run the collector beside each LiteLLM proxy. The collector stores usage events and uploads compacted batches to Vantage.
- Install this callback in the LiteLLM Python environment. The callback sends usage events to the local collector over its Unix socket.
The callback cannot upload usage to Vantage by itself. The collector cannot collect LiteLLM usage without the callback. See the collector repository README for deployment and configuration instructions.
Install
Install a released version with:
pip install vantage-litellm-callback
To work from a source checkout, install this directory with pip install ..
Configure LiteLLM with:
litellm_settings:
callbacks:
- vantage_callback.callback_instance
See the repository README for collector setup and lifecycle billing semantics.
The callback is fail-open: collector outages, acknowledgement failures, malformed
responses, queue pressure, and projection errors never block or fail a provider
request. Usage events are placed into a bounded in-process queue and delivered by
a background worker. When delivery is unhealthy, the worker opens a circuit,
aggregates bounded loss information, and periodically probes the collector with a
versioned delivery_gap control frame. Normal delivery resumes only after that
frame receives a durable acknowledgement.
Configuration:
VANTAGE_COLLECTOR_DELIVERY_QUEUE_SIZE(default1024)VANTAGE_COLLECTOR_RECOVERY_PROBE_SECONDS(default5)VANTAGE_COLLECTOR_GAP_EVENT_ID_SAMPLE_SIZE(default32)VANTAGE_COLLECTOR_GAP_SUMMARY_INTERVAL_SECONDS(default60)VANTAGE_COLLECTOR_SOCKET_PATH(default/var/run/vantage-collector/collector.sock)VANTAGE_COLLECTOR_ACK_TIMEOUT_SECONDS(default5)VANTAGE_COLLECTOR_CONNECTION_POOL_SIZE(default16)
The queue and gap aggregate are intentionally process-local and bounded. A process exit may therefore lose queued events; the gap frame reports losses observed while the process remains alive.
Metadata
Release files for vantage-litellm-callback 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 | Provenance | Actions |
|---|---|---|---|---|
| vantage_litellm_callback-0.1.0.tar.gz | 40.9 kB | With provenance | Details for vantage_litellm_callback-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vantage_litellm_callback-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for vantage_litellm_callback-0.1.0-py3-none-any.whl |
Total release size: 64.4 kB
Release files / vantage_litellm_callback-0.1.0.tar.gz
| Download URL | vantage_litellm_callback-0.1.0.tar.gz |
|---|---|
| Size | 40.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f72e391eb831b3204a4ea829030fa6bb973bf3a334a1ca6739a9d3a5cec1990
|
|
BLAKE2b-256 checksum How to use checksums |
696289c8562b4fae06e187a1f2603372a1c7f3a1e245590cae43605f4c2024c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logRelease files / vantage_litellm_callback-0.1.0-py3-none-any.whl
| Download URL | vantage_litellm_callback-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf50398e23ef3811fff6ad729b805dadc0e7b5ef8401ee3a750b4f14e49b996e
|
|
BLAKE2b-256 checksum How to use checksums |
4fda592f45248b49f0368bcb4e07c562619a9c32a99156d784663e06f6bd730e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logSecurity for vantage-litellm-callback 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for vantage_litellm_callback-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.