Metadata-Version: 2.4
Name: litellm-openttt
Version: 0.1.0
Summary: TTTPS Proof-of-Time success callback for LiteLLM: cryptographic audit-trail timestamps for LLM completions via the public KPP Provenance API
License: MIT
Project-URL: Homepage, https://github.com/Helm-Protocol/OpenTTT
Project-URL: Repository, https://github.com/Helm-Protocol/OpenTTT
Project-URL: Issues, https://github.com/Helm-Protocol/OpenTTT/issues
Keywords: litellm,proof-of-time,provenance,temporal-attestation,audit-trail,llm-observability
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24
Requires-Dist: litellm>=1.0

# litellm-openttt

TTTPS Proof-of-Time success callback for [LiteLLM](https://github.com/BerriAI/litellm). Attaches a
cryptographic audit-trail timestamp (a signed Proof-of-Time receipt) to every
`litellm.completion()` / `litellm.acompletion()` response, sealed against the
public self-serve [KPP Provenance API](https://kpp.kenosian.com).

This attaches a cryptographic audit-trail timestamp and integrity hash. It does
**not** certify legal or regulatory compliance (EU AI Act, FDA, and so on).
Treat it as an audit-trail timestamp, not a compliance claim.

## Install

```bash
pip install litellm-openttt
```

## Usage

```python
import litellm
from litellm_openttt import TTTPSTimestampLoggerKPPLive

litellm.callbacks = [TTTPSTimestampLoggerKPPLive()]

resp = litellm.completion(
    model="gpt-3.5-turbo",
    messages=[{"role": "user", "content": "hi"}],
)

print(resp.tttps_receipt)
# {"status": "ok", "receipt_id": "...", "receipt": "...", "time": "...", ...}
```

Set `KPP_API_KEY` (mint one for free via `POST https://kpp.kenosian.com/v1/keys`)
and optionally `KPP_BASE` / `KPP_TIMEOUT_S` as environment variables.

Fail-open: any network/upstream error degrades the receipt to
`{"status": "degraded", ...}` and is logged. It never raises out of the
callback, so the LLM response itself is never blocked or mutated.

## License

MIT
