luca-litellm
Send the cost of every call through your LiteLLM proxy to Luca, so your finance team gets AI spend by customer, team and model, accrued and matched to each provider's invoice, with journal entries for the ERP.
Only the fields accounting needs leave your network: when the call was made, the provider and model, the cost and token counts, and the team, key, project, customer, tags and MCP server LiteLLM records with it. The plugin drops the prompt, the response, tool arguments and tool results before anything is sent. Email addresses are left out unless you turn them on.
Set up
- In Luca, add a LiteLLM AI gateway connection. Luca shows its webhook URL. Make an ingest token for it:
openssl rand -hex 32 - On the machine that runs the proxy:
pip install luca-litellm - Add the plugin to the proxy's
config.yaml:litellm_settings: callbacks: ["luca_litellm.handler"]
- Set two environment variables for the proxy:
LUCA_LITELLM_URL=<the webhook URL Luca shows> LUCA_LITELLM_TOKEN=<the ingest token> - Restart the proxy.
The plugin sends calls in batches (every 10 seconds, or every 200 calls), outside the request path, so it adds no time to your calls. If Luca can't be reached, it keeps the calls and tries again.
Which customer a call served
LiteLLM records a customer for each call when your app passes user in the request, or when the call uses a key or team set up for that customer. Luca uses it to show AI cost by customer.
Options
| Variable | What it does |
|---|---|
LUCA_LITELLM_URL |
The connection's webhook URL (required) |
LUCA_LITELLM_TOKEN |
The connection's ingest token (required) |
LUCA_LITELLM_INCLUDE_EMAIL |
true to send the user's email address with each call (off by default) |
To use it from the LiteLLM Python SDK instead of the proxy:
import litellm
from luca_litellm import LucaLogger
litellm.callbacks = [LucaLogger(url="https://…", token="…")]
Without installing a package
LiteLLM's built-in webhook callback can send the same calls. Luca shows that configuration on the connection too. With it, turn message logging off (turn_off_message_logging: true) so prompts and responses are not sent.
Apache-2.0. Questions: hello@luca.network
Metadata
Release files for luca-litellm 0.1.1
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 |
|---|---|---|---|---|
| luca_litellm-0.1.1.tar.gz | 12.0 kB | With provenance | Details for luca_litellm-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| luca_litellm-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for luca_litellm-0.1.1-py3-none-any.whl |
Total release size: 22.4 kB
Release files / luca_litellm-0.1.1.tar.gz
| Download URL | luca_litellm-0.1.1.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
959d91e1e702bc03535e61c3f97d98b5468f17cf061bf9b4d8556bb3b7620f15
|
|
BLAKE2b-256 checksum How to use checksums |
6cc0548339c0bcad1b138e230080e502f06118c12330935aa8f66ad59d4a71eb
|
| 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 24, 2026.
Transparency logRelease files / luca_litellm-0.1.1-py3-none-any.whl
| Download URL | luca_litellm-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3bb136a5c2b7447e5c3802b8508bfd0c61014e7888adbfb016ddd33c351f5bd
|
|
BLAKE2b-256 checksum How to use checksums |
4a839baeaa77fe68084deecb37a39fbb7a64c1404c2d9d8709c1e11518f49c80
|
| 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 24, 2026.
Transparency logSecurity for luca-litellm 0.1.1
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 luca_litellm-0.1.1.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 24, 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.