Proof Portal

Project overview

litellm

BerriAI117 findings · 107 requirements

LiteLLM Python->Rust migration audit (proof mirroring).

93 withheld (location undisclosed)

All requirements
RequirementSTK-REQ-260701-Y5H2StakeholderApproved

As a LiteLLM user, I need the Mistral OCR provider to accept my documents, filter parameters to what Mistral supports, target the correct Mistral OCR endpoint, authenticate my request, and return structured OCR results so that I can extract text and structured content from documents reliably

This requirement changed after its last recorded review, so approval is stale. Automated checks pass and 2/2 obligations are satisfied.
PriorityshallTypeguaranteeCategoryfunctionalComponentmistral_ocrAssuranceEFindingsnone open

Specification

The requirement exactly as authored — its complete prose text and, where present, the formal FRETish sentence it compiles to.

Description

As a LiteLLM user, I need the Mistral OCR provider to accept my documents, filter parameters to what Mistral supports, target the correct Mistral OCR endpoint, authenticate my request, and return structured OCR results so that I can extract text and structured content from documents reliably

Rationale & tags

Why this requirement exists, and how it is categorised.

Mistral OCR is the reference OCR provider integration; its request/response contract and error handling must be specified and verified

Verification & provenance

How this requirement was checked: the review trail, edit history, and the machine-analysis status terms (each ⓘ explains what it means).

Assurance levelE
Formalizationnone
Strategyinformal

Review

Status
approved
Reviewer
Buger · system_owner
Reviewed
Jul 1, 2026, 16:42 UTC
“Owner-authorized review: system/interface/stakeholder contract verified end-to-end; acceptance + integration witnessed; obligations complete”

History

Created
Jul 1, 2026, 09:52 UTC · Claude Code · AI agent
Modified
Jul 2, 2026, 05:52 UTC · Claude Code · AI agent

Hazard review

Reviewed Jul 2, 2026, 05:52 UTCby agent:claude-codecatalog v1.3.0
  • scenarioreviewednominalerror_handlingmalformed_input

    Stakeholder aggregate carries the OCR request/response behavioral partitions: nominal structured OCRResponse (AC-001), error_handling for missing-key rejection before any provider call (AC-003) and parse re-raise, malformed_input for non-dict document rejection; these decompose into the mistral_ocr SW-REQs

  • domainreviewed

    The external-call reliability and http-client domain classes govern the concrete POST /v1/ocr network call, which lives at INT-REQ-001 (callee mistral_ocr_api) and the OCR call path litellm/ocr/main.py plus BaseLLMHTTPHandler; INT-REQ-001 already accepts all six, so they are suppressed on this aggregate that performs no I/O

  • propertynot applicable

    Cross-cutting property invariants (determinism, idempotency, commutativity, monotonicity, totality, atomicity, invariant_preservation) do not pertain to a single-shot OCR request/response stakeholder aggregate: the Mistral OCR call is a non-idempotent external POST with no ordering or accumulation semantics, and invariant_preservation is Go-only lemma authoring while this component is Python

  • structuralnot applicable

    Structural language-safety classes (nil_safety, overflow_safety, encoding_safety, pointer_arithmetic_bounded, format_string_constant, manual_memory_ownership_clear) target C/low-level memory and printf hazards; this is an informal Python stakeholder aggregate with no runtime code of its own and no manual memory, pointer arithmetic, or format strings

Change history

Every recorded revision of this requirement's source file — newest first, each with its commit message and the diff for that change.

Obligations

What this requirement must witness to be considered satisfied — the required evidence, and the tests that discharge each one.

3 obligations · 3 discharged

Browse the catalogue

Evidence tagged via <REQ> is witnessed by a requirement that satisfies this one — normal for stakeholder / aggregate requirements, which are proven through the requirements that refine them.

Discharged

Behavior when operations fail or dependencies are unavailable.

Discharging evidence1/1 required witnessed
Discharged

Behavior when inputs are syntactically or structurally invalid.

Discharging evidence1/1 required witnessed
  • negativerequiredpresent
    Covered by 1 test
    via SYS-REQ-260701-3HNG
  • nominalrecommendedpresent
    Covered by 1 test
    via SYS-REQ-260701-3HNG
Discharged

Happy-path behavior with valid inputs.

Discharging evidence0/0 required witnessed

Acceptance criteria

Stakeholder conditions for satisfaction, traced to the derived requirements and evidence that discharge them.

Stakeholder-authored conditions defining when the requirement is satisfied, traced to derived requirements / evidence.

  • AC-001verify: test

    A user OCR request with a valid Mistral-format document dict returns a structured OCRResponse with pages, model, and object=ocr

    Derived requirements
    Acceptance test
  • AC-002verify: test

    An OCR request carrying unsupported parameters forwards only Mistral-supported parameters to the provider endpoint

    Derived requirements
    Acceptance test
  • AC-003verify: test

    An OCR request with no resolvable Mistral API key is rejected with a clear error before any provider call

    Derived requirements
    Acceptance test
  • AC-004verify: test

    A user OCR request targets exactly one Mistral /v1/ocr endpoint for the default base and for a caller-supplied api_base, never doubling into /v1/v1

    Derived requirements
    Acceptance test
  • AC-005verify: test

    A user OCR request is authenticated with a Bearer header whose key is taken from the api_key argument when supplied, otherwise from MISTRAL_API_KEY, with the argument taking precedence over the environment

    Derived requirements
    Acceptance test

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.

Impact

Blast radius — authored trace links only (automatically derived links come from the audit index and aren't shown here).

If you change this

Requirements
15
Files
4
Tests
2
At-risk contracts
0

Files to re-check (4)

  • transformation.rslitellm-rust/crates/core/src/providers/mistral/ocr/transformation.rs
  • transformation.pylitellm/llms/mistral/ocr/transformation.py
  • transformation.rslitellm-rust/crates/core/src/ocr/transformation.rs
  • common_utils.rslitellm-rust/crates/ai-gateway/src/ocr/common_utils.rs

Tests to re-run (2)

  • test_mistral_ocr_transformation.pytests/test_litellm/llms/mistral/ocr/test_mistral_ocr_transformation.py
  • tests.rslitellm-rust/crates/ai-gateway/src/ocr/tests.rs

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.

Sign in to discuss this with the proof team.Sign in