Skip to main content

English · Français

LiteLLM × NeoMundi

Measure every completion that goes through LiteLLM — in your application or in the Proxy — with one custom logger, and never a token count the provider did not publish.

Quickstart · What it refuses to do · Notebook · Limitations · Cost


Evidence level: E2. Four real completions, through LiteLLM's OpenAI-compatible route to a local Ollama model, were measured on the service verification account on 2026-11-26 and re-read from the API as persisted: 4/4, served measurement_version 3.5.0, 0.12 CHF. Two more phases were refused on real calls and billed nothing: LiteLLM's native ollama/ route, whose count cannot be proven to be the provider's, and an embedding. Proof: evidence/e2_qualification_20261126T094917Z.json. See LIMITATIONS.md §9.

What this is

NeoMundiLogger is a LiteLLM CustomLogger. Attached once, it submits each chat completion LiteLLM reports to NeoMundi's POST /v1/govern, with the latency LiteLLM observed around the call and the token count the provider published. It drives the neomundi SDK and reimplements none of it.

The one thing it adds on top of a plain logger: LiteLLM fills a silent provider's usage with 0 or with its own tokenizer's estimate, and those look exactly like a real count. This logger checks each count against the provider's raw payload and refuses what it cannot trace there.

What it is not

  • Not an evaluator. It transports measurements; it does not interpret them.
  • Not a tracer. There is no trace-only route: every submission is a billed observation.
  • Not a truth checker. NeoMundi verifies integrity and authenticity, not whether an answer was true.
  • Not a cost meter. LiteLLM's response_cost is a price-table value; it is reported, and not sent unless you ask.

Install

pip install litellm-neomundi

Python ≥ 3.11. Depends on litellm>=1.111.0,<2.0 and neomundi>=2.1.0,<3.0.

Quickstart

logger = NeoMundiLogger(api_key=..., base_url="https://api.neomundi.io")
litellm.callbacks = [logger]
answer = litellm.completion(model="ollama_chat/llama3.2", messages=messages)

Free first: NeoMundiLogger(submit=False) needs no key, opens no socket, and runs every check — so you can see how many of your completions would be measured before spending anything.

Two lines, no key, and you see it happen: examples/03_the_count_you_see.py shows LiteLLM reporting a token count that no provider published, and the logger refusing it.

In the LiteLLM Proxy, put an instance in a module and reference it under litellm_settings.callbacks in config.yaml. Read LIMITATIONS §2 first: async streams are refused.

Refusals

Situation Status Sent to NeoMundi
The provider published no token count (LiteLLM says 0 or estimates) not_submitted_unverified_token_count nothing
Async stream: the provider's payload is out of the logger's reach not_submitted_unverified_token_count nothing
LiteLLM gave no usable start/end time not_submitted_no_latency nothing
LiteLLM answered from its cache not_submitted_cache_hit nothing
Your LLM call failed not_submitted_application_error nothing; your exception is untouched
Embedding, image or other non-chat call not_submitted_unsupported_call nothing
sample_rate excluded the call skipped_sampling nothing
submit=False not_submitted_local_only nothing
The NeoMundi API failed or was unreachable not_submitted_transport_error attempted; your call is untouched

No exception from this logger ever reaches your application — tested under eight distinct API failures and malformed inputs.

What it costs

🔴 Every submitted observation is a billed measurement (0.030 CHF on TIER_03). sample_rate defaults to 1.0, and a gateway sees every call of every application behind it. Lower it before going live; the decision is deterministic in litellm_call_id.

Kill switch: logger.sample_rate = 0.0 — immediate. Do not rely on litellm.callbacks = []: LiteLLM keeps a logger registered after that (LIMITATIONS §4).

Honest status

Offline test suite 47 tests, green on Python 3.12 / Linux locally; CI runs 3.11–3.13 on Linux, macOS, Windows
Real execution E2: 4 observations submitted to https://api.neomundi.io, 4/4 re-read as persisted (2026-11-26, Python 3.12, neomundi 2.1.0). See evidence/
Maturity beta

Read LIMITATIONS.md before drawing a conclusion from any score.

See it measured

A live demonstration of this integration's subject, token-count provenance through LiteLLM, is at neomundi.io/demo-12. The page links the sources it draws on and carries its own section on what it does not establish.

License

Apache-2.0. See LICENSE.

Metadata

Release files for litellm-neomundi 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for litellm-neomundi 0.1.1
File Size Uploaded Provenance Actions
litellm_neomundi-0.1.1.tar.gz 22.0 kB With provenance Details for litellm_neomundi-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for litellm-neomundi 0.1.1
File Interpreter ABI Platform Actions
litellm_neomundi-0.1.1-py3-none-any.whl Python 3 none any Details for litellm_neomundi-0.1.1-py3-none-any.whl

Total release size: 35.4 kB

Release files / litellm_neomundi-0.1.1.tar.gz

Download URL litellm_neomundi-0.1.1.tar.gz
Size 22.0 kB
Tags Source
SHA-256 checksum
How to use checksums
be60994713275677de93d509725c55e645aa4ec99d44df19a8c894a2930dd18d
BLAKE2b-256 checksum
How to use checksums
b573b5d896ea547c43b7499c1bed41874991ecf7fea3f17c19d5ae8aaae878a4
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 30, 2026.

Transparency log

Release files / litellm_neomundi-0.1.1-py3-none-any.whl

Download URL litellm_neomundi-0.1.1-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20d5c9d41ea6d52cc1fc9fe2334d525ac5c15b15605e757a42785f52f86e76d7
BLAKE2b-256 checksum
How to use checksums
8c74e455721a3e3fe7444c711b1a75f24f9a26eddbee878eda7d0b063eb496a7
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 30, 2026.

Transparency log

Security for litellm-neomundi 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.

Select from 2 files

Attestation for litellm_neomundi-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 30, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page