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: E1 — offline only. No real measurement has been taken with this package yet: the window that built it had no NeoMundi service verification key. The suite drives the real litellm.completion and the real neomundi client through mock transports. 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

Not on PyPI yet — pip install litellm-neomundi does not work. Install from the repository:

pip install 'git+https://github.com/neomundi-io/neomundi-integrations.git#subdirectory=integrations/litellm'

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.

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 none — E1. 0 observations submitted, 0 re-read
Maturity experimental

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

License

Apache-2.0. See LICENSE.

Metadata

Release files for litellm-neomundi 0.1.0

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.0
File Size Uploaded Provenance Actions
litellm_neomundi-0.1.0.tar.gz 20.9 kB With provenance Details for litellm_neomundi-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 34.1 kB

Release files / litellm_neomundi-0.1.0.tar.gz

Download URL litellm_neomundi-0.1.0.tar.gz
Size 20.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a0706e0f6425996d00642fe5ac7eaad410ac3432538fe617aa462ef8e937fc56
BLAKE2b-256 checksum
How to use checksums
4b8c47c7cb558231a2713c6aee2c7fecb4b71fca8e760d2f8f6496cfe3362c5a
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 26, 2026.

Transparency log

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

Download URL litellm_neomundi-0.1.0-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca47969cbbef811fddad5a2992f867722a0bfe1beaf3e53d0412a2078f7ebf9b
BLAKE2b-256 checksum
How to use checksums
430d3ae26881345b764163a7289359da39a6db1f9f034d34f651e4388f419edd
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 26, 2026.

Transparency log

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

Select from 2 files

Attestation for litellm_neomundi-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 26, 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.0 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