Proof Portal
litellm
BerriAI117 findings · 107 requirementsLiteLLM Python->Rust migration audit (proof mirroring).
93 withheld (location undisclosed)
Interface decomposition of SYS-REQ-260701-3HNG between mistral_ocr and mistral_ocr_api.
Specification
The requirement exactly as authored — its complete prose text and, where present, the formal FRETish sentence it compiles to.
Interface decomposition of SYS-REQ-260701-3HNG between mistral_ocr and mistral_ocr_api. The Mistral OCR integration shall honor the provider request/response contract: forward only supported parameters, build a well-formed request or reject a non-dict document, target the canonical Mistral OCR endpoint, require an API key, and return a structured OCR response or re-raise a parse failure
Rationale & tags
Why this requirement exists, and how it is categorised.
Rationale & tags
Why this requirement exists, and how it is categorised.
Documents the interface contract decomposed from SYS-REQ-260701-3HNG between mistral_ocr and mistral_ocr_api.
Verification & provenance
How this requirement was checked: the review trail, edit history, and the machine-analysis status terms (each ⓘ explains what it means).
Review
- Status
- approved
- Reviewer
- Buger · system_owner
- Reviewed
- Jul 1, 2026, 16:42 UTC
History
- Created
- Jul 1, 2026, 10:31 UTC · Claude Code · AI agent
- Modified
- Aug 1, 2026, 18:27 UTC · Claude Opus 4 8 · AI agent
Hazard review
- scenarioreviewednominalmalformed_inputerror_handlingempty_input
- propertynot applicable
INT-REQ-001 is a request/response transform plus a single POST /v1/ocr; it has no algebraic property surface. Output is the upstream OCR result (not a local pure function), a single document maps to a single response (no commutativity/monotonicity over an input set), OCR is a stateless read-style RPC (no idempotency/atomicity over local state), and totality is already partitioned by the accepted scenario obligations
- structuralreviewednil_safety
- domainreviewedexternal_call_timeout_boundedexternal_call_failure_observableexternal_call_concurrency_boundedupstream_budget_coordinatedcert_validation_strictredirect_policy_explicittls_required_for_secretssecrets_not_loggedssrf_protectionrequest_timeout_boundedretry_policy_explicitcert_chain_validateduntrusted_input_bounded
Change history
Every recorded revision of this requirement's source file — newest first, each with its commit message and the diff for that change.
Open known issues
Findings currently open against this requirement — issues its verification surfaced that are not resolved yet. Each links to the full finding.
Obligations
What this requirement must witness to be considered satisfied — the required evidence, and the tests that discharge each one.
18 obligations · 4 deferred · 14 discharged
Browse the catalogueCertificate verification shall validate the full chain to a configured trust root, not just the leaf.
If the TLS chain is accepted without validating to a trusted root, an attacker presenting a forged certificate transparently terminates the session, harvests the Bearer key, and returns attacker-chosen OCR text the caller trusts as genuine
- nominalrequiredpresentCovered by 1 test
- negativerecommendedpresentCovered by 1 test
HTTP clients shall verify TLS certificates, hostnames, and chains; InsecureSkipVerify and equivalent shall not be enabled in production.
- nominalrequiredpresentCovered by 1 test
- negativerecommendedpresentCovered by 1 test
Behavior when inputs are absent, nil, zero-length, or blank.
- nominalrequiredpresentCovered by 1 test
Behavior when operations fail or dependencies are unavailable.
- negativerequiredpresentCovered by 3 tests
- nominalrequiredpresentCovered by 2 tests
Outbound concurrency to each external dependency shall be capped (semaphore / bulkhead / circuit breaker) so that one stalled dependency cannot exhaust caller capacity.
Deferred — tracked by a finding withheld pending disclosure.
- nominalrequireddeferredWitnessing deferred — accepted while the tracking known issue stays open.
External-call failures (timeout, unreachable, refused, TLS error) shall map to typed errors that the caller surfaces; silent retries / black-hole drops are forbidden without explicit policy.
- nominalrequiredpresentCovered by 4 tests
Every cross-process call shall declare connect, read, and total deadlines; no external call is defaulted to "no timeout."
- nominalrequiredpresentCovered by 2 tests
Behavior when inputs are syntactically or structurally invalid.
- negativerequiredpresentCovered by 1 test
- nominalrequiredpresentCovered by 1 test
Behavior specified when inputs are nil, null, or zero-value.
- negativerequiredpresentCovered by 1 test
- nominalrequiredpresentCovered by 1 test
Happy-path behavior with valid inputs.
- nominalrequiredpresentCovered by 2 tests
HTTP clients shall declare their redirect-following policy (max hops, scheme/host invariants, header propagation).
- nominalrequiredpresentCovered by 1 test
HTTP clients shall enforce per-request timeouts (dial, TLS handshake, read header, read body) and shall not block indefinitely.
- nominalrequiredpresentCovered by 2 tests
HTTP clients shall declare an explicit retry policy (which methods, which errors, max attempts, backoff schedule, jitter).
Control absent on the OCR call path; real reliability/security gap documented in KI-ocr-retry (owner, remediation). Honest tracked debt, not a sham suppression.
- nominalrequireddeferredWitnessing deferred — accepted while the tracking known issue stays open.
Authorization headers, session IDs, secrets, and PII never appear in logs.
If the Bearer key or Authorization header is written to debug/verbose logs, anyone with access to log aggregation, support bundles, or a shared console exfiltrates a live Mistral credential
- nominalrequiredpresentCovered by 2 tests
- negativerecommendedpresentCovered by 2 tests
HTTP clients with user-influenced URLs shall enforce an allowlist of reachable destinations and reject internal-network targets.
Deferred — tracked by a finding withheld pending disclosure.
- nominalrequireddeferredWitnessing deferred — accepted while the tracking known issue stays open.
Endpoints handling secrets shall reject plaintext HTTP.
If the Bearer Mistral key rides an unencrypted or downgraded HTTP connection, a network MITM captures the live credential and can bill unlimited OCR/LLM usage to the customer and read every document they submit
- nominalrequiredpresentCovered by 2 tests
Deserialization of untrusted input shall enforce schema, type, and size bounds before any object construction.
- nominalrequiredpresentCovered by 1 test
Spec shall enumerate the upstream timeout chain (load balancer, ingress, peer service, client-side proxy) and prove that the caller's total call budget is strictly less than the minimum upstream timeout.
Deferred — tracked by a finding withheld pending disclosure.
- nominalrequireddeferredWitnessing deferred — accepted while the tracking known issue stays open.
Its place
How this requirement connects — what proves it, what it affects, and what it rests on. Authored links only here; automatically derived links come from the audit index.
Loading graph…
Trace evidence
The concrete artifacts linked to this requirement — implementing code, verifying tests, documents, and the findings raised against it.
No implementation linked
No source files are traced to this requirement yet.
Mirrors
Ports this requirement participates in — it carries a reviewed exemption on one side, or a finding raised against it is tracked as part of the port.
Mirrors
Ports this requirement participates in — it carries a reviewed exemption on one side, or a finding raised against it is tracked as part of the port.
- Mistral OCR: Python -> RustMIR-001InheritedPython → RustView in Mirrors
Impact
Blast radius — authored trace links only (automatically derived links come from the audit index and aren't shown here).
Impact
Blast radius — authored trace links only (automatically derived links come from the audit index and aren't shown here).
If you change this
Tests to re-run (2)
- tests.rslitellm-rust/crates/ai-gateway/src/ocr/tests.rs
- test_mistral_ocr_transformation.pytests/test_litellm/llms/mistral/ocr/test_mistral_ocr_transformation.py
What this rests on
Discussions
Discuss this with the proof team. Nothing changes in your audit automatically — you open a request and a staff member records any outcome inside the thread.