ledgerproof-mistral
LedgerProof adapter for the Mistral Python SDK (mistralai>=1.0).
Emits side-channel cryptographic transparency receipts for AI-touched interactions, suitable as an evidence layer for EU AI Act Article 50 (transparency obligations for providers and deployers of AI systems).
This adapter works with anyone using the Mistral SDK directly:
mistralai.Mistralclient — syncchat.complete()andchat.stream()- Async —
chat.complete_async()andchat.stream_async() - Function / tool calls — recorded into the
tool_usesblock of the receipt - EU-sovereign AI attribution (
eu_sovereign_ai_session/v1) — record Mistral-as-EU-provider facts (region, residency, control plane) alongside Article 50 transparency evidence
5-minute quickstart
pip install ledgerproof-mistral
export MISTRAL_API_KEY=...
from mistral_ledgerproof import LedgerProofMistral, LogEmitter
client = LedgerProofMistral(
deployer_id="acme-corp-eu",
api_key="...", # or read from MISTRAL_API_KEY
emitter=LogEmitter(),
)
response = client.chat.complete(
model="mistral-large-latest",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)
# A signed receipt has already been emitted to the log emitter side-channel.
The Mistral ChatCompletionResponse is returned unchanged. The receipt is emitted to the side channel only.
Three integration patterns
- Client wrapper (recommended) —
LedgerProofMistralwrapsmistralai.Mistraland interceptschat.complete()/chat.stream().LedgerProofAsyncMistraldoes the same forcomplete_async()/stream_async(). - Decorator —
@lpr_track(deployer_id="...")for user-defined functions that already wrap a Mistral call. - Manual emission —
emit_receipt(response, deployer_id, regulatory_context)for full control.
See examples/ for runnable code:
01_chat_quickstart.py— minimum viable wrap ofchat.complete()02_streaming.py— incremental-hash streaming03_eu_sovereign_attribution.py—eu_sovereign_ai_session/v1schema
EU-sovereign AI attribution
Because Mistral is a French / EU-headquartered model provider, this adapter ships a third schema —
eu_sovereign_ai_session/v1 — that lets deployers record EU residency / control facts inline with the
Article 50 receipt:
from mistral_ledgerproof import EuSovereigntyAttestation, LedgerProofMistral
client = LedgerProofMistral(
deployer_id="acme-bank-eu",
schema="eu_sovereign_ai_session/v1",
eu_sovereignty=EuSovereigntyAttestation(
inference_region="eu-west-3",
eu_data_residency=True,
eu_operated_infrastructure=True,
provider_eu_headquartered=True,
provider_legal_entity="Mistral AI SAS (Paris)",
),
)
The attestation block is descriptive metadata only — see the scope disclaimer below.
Architectural discipline (C1–C8)
This adapter is implemented under the LedgerProof protocol's load-bearing constraints:
- C1: No claim of regulator endorsement. No claim of Article 40 presumption of conformity.
- C4: Local verification only. The adapter does not phone home to LedgerProof servers during normal operation.
- C6: Stream-aware signing. Streaming responses are signed using an incremental SHA-256 over text deltas; the body is never buffered in full.
- C7: Side-channel emission only. The adapter cannot and does not modify the Mistral response payload.
GDPR data-minimisation
Receipts never carry raw prompt or response text. Content is referenced by SHA-256 hash + byte length only.
Identifier fields (deployer_id, user_session_id) reject email-shaped strings to prevent accidental
direct-identifier leakage.
Scope disclaimer
LedgerProof provides an evidence layer for Article 50 transparency obligations only.
It does not cover:
- Article 9 (risk management system)
- Article 10 (data and data governance)
- Article 13 (transparency and information to deployers)
- Article 15 (accuracy, robustness, and cybersecurity)
- Article 72 (post-market monitoring)
LedgerProof does not confer presumption of conformity under Article 40. LedgerProof is not endorsed by the European Commission, the AI Office, any national competent authority, or Mistral AI SAS.
The EuSovereigntyAttestation block is deployer-asserted descriptive metadata. It is not a
certification of EU sovereignty, EUCS conformance, GDPR Schrems-II adequacy, or any similar regulatory finding.
This adapter wraps the official Mistral Python SDK; it is not affiliated with Mistral AI SAS.
License
Apache 2.0. Copyright 2026 LedgerProof Foundation (in formation: US 501(c)(3) Delaware + Dutch Stichting EU subsidiary).
Metadata
Release files for mistral-ledgerproof 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 | |
|---|---|---|---|---|
| mistral_ledgerproof-0.1.0.tar.gz | 26.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mistral_ledgerproof-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.1 kB
Release files / mistral_ledgerproof-0.1.0.tar.gz
| Download URL | mistral_ledgerproof-0.1.0.tar.gz |
|---|---|
| Size | 26.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e077fb717cee7b92ab8736fa6ca4b8195890cda301b948692c14699e35d104d
|
|
BLAKE2b-256 checksum How to use checksums |
d499d94bc83c888ca5bd1d83cda2f2d7fc54625ecef495e476d8147615796730
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / mistral_ledgerproof-0.1.0-py3-none-any.whl
| Download URL | mistral_ledgerproof-0.1.0-py3-none-any.whl |
|---|---|
| Size | 25.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15197b4ee23797e738a9e98f5b36ebfb148b4bbbf00bfb857dfec8537996ae63
|
|
BLAKE2b-256 checksum How to use checksums |
17698247bbc00b22857cdd14f6bfa225d231cd20477e266d3c84157dcdbe8c0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Security for mistral-ledgerproof 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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.