LedgerProof adapter for the Mistral Python SDK. Side-channel transparency receipts for EU AI Act Article 50.
Project description
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).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mistral_ledgerproof-0.1.0.tar.gz.
File metadata
- Download URL: mistral_ledgerproof-0.1.0.tar.gz
- Upload date:
- Size: 26.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e077fb717cee7b92ab8736fa6ca4b8195890cda301b948692c14699e35d104d
|
|
| MD5 |
d31462a50f8f8a03e2088be85c4a0943
|
|
| BLAKE2b-256 |
d499d94bc83c888ca5bd1d83cda2f2d7fc54625ecef495e476d8147615796730
|
File details
Details for the file mistral_ledgerproof-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mistral_ledgerproof-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15197b4ee23797e738a9e98f5b36ebfb148b4bbbf00bfb857dfec8537996ae63
|
|
| MD5 |
f951774f3bda3dd441ae9d27e179d7f6
|
|
| BLAKE2b-256 |
17698247bbc00b22857cdd14f6bfa225d231cd20477e266d3c84157dcdbe8c0e
|