Proof Portal

Project overview

litellm

BerriAI117 findings · 107 requirements

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

93 withheld (location undisclosed)

All requirements
RequirementSW-REQ-260701-KYETSoftwareApproved

get_complete_url appends only /ocr when the effective base already ends with /v1 (default base or caller base ending in /v1), otherwise appends /v1/ocr, yielding exactly one /v1 segment

This requirement changed after its last recorded review, so approval is stale. Automated checks pass and 4/4 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

get_complete_url appends only /ocr when the effective base already ends with /v1 (default base or caller base ending in /v1), otherwise appends /v1/ocr, yielding exactly one /v1 segment

FRETish formula
the mistral_ocr shall always satisfy (appends_ocr_only <-> (api_base_is_none | base_ends_with_v1))
View full formal model

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
Formalizationvalid
Strategyfretish

Review

Status
approved
Reviewer
Buger · lead_engineer
Reviewed
Jul 1, 2026, 16:42 UTC
“Owner-authorized review: FRETish matches implementation behavior, review gate PASS, obligation evidence complete, code + requirement MC/DC 100%, witnessing tests green”

History

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

Hazard review

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

    Pure in-process URL string builder; the sole domain hazard that applies is pure-function property testing of the biconditional. All external-call/http-client reliability classes are suppressed because the real Mistral network call lives on the OCR dispatch path (litellm/ocr/main.py via BaseLLMHTTPHandler), not in this transform

  • scenarioreviewednominalempty_input
  • propertyreviewedtotality
  • structuralreviewed

    Only structural input hazard is api_base=None, dispositioned as the empty_input scenario partition; no numeric overflow, encoding round-trip, or memory-ownership concerns exist in a pure str-returning transform

Change history

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

Review history

Human and AI-agent approvals of this requirement — the 'why was this approved' lineage, each with the reviewer's justification and the code it cites.

  1. UnknownApprovedSpec conformanceJul 1, 2026 · 5 months agoREVIEW-1

    get_complete_url: line 134 'if api_base is None' sets the default base ending in /v1; line 141 'if api_base.endswith("/v1")' gates appending /ocr vs /v1/ocr. FRETish appends_ocr_only <-> (api_base_is_none | base_ends_with_v1) matches: the default base and a /v1-terminated base both take the append-only-/ocr branch, else /v1/ocr.

    Cited code (2)

Obligations

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

4 obligations · 4 discharged

Browse the catalogue
Discharged

Behavior when inputs are absent, nil, zero-length, or blank.

Discharging evidence1/1 required witnessed
  • nominalrequiredpresent
    Covered by 2 tests
Discharged

Happy-path behavior with valid inputs.

Discharging evidence1/1 required witnessed
  • nominalrequiredpresent
    Covered by 5 tests
Discharged

A function declared pure (no I/O, no global state, output is f(input) only) shall carry property-based tests that exercise its declared algebraic properties (determinism, totality, commutativity, monotonicity, idempotency — whichever apply); example-based tests alone shall not be sufficient evidence for a pure-function obligation.

Discharging evidence1/1 required witnessed
  • nominalrequiredpresent
    Covered by 2 tests
Discharged

Every reachable input combination is covered by a requirement.

Discharging evidence1/1 required witnessed
  • nominalrequiredpresent
    Covered by 2 tests

Formula evidence

The formal formula behind this requirement, the variables it is written over, and the tests that exercise it (each term is explained inline).

FRETish formula

the mistral_ocr shall always satisfy (appends_ocr_only <-> (api_base_is_none | base_ends_with_v1))

Witnesses· 2 scenarios total

  • test_custom_base_without_v1_gets_v1_ocr
    exercises 1 condition scenario

MC/DC truth table· 4 rows

Each row assigns the formula's conditions (T/F) and shows the Result— the formula's value for that input row, not a test pass/fail. A row proves a condition when flipping only that condition flips the outcome. The test that covers each row is linked.

Covereda test exercises this rowExempteda reviewed mcdc:ignoreNo-actionfalse-result row satisfied by designUncoveredneeds a covering test
#api_base_is_noneappends_ocr_onlybase_ends_with_v1ResultProvesCovering test
1FFFTapi_base_is_none
2FFTFbase_ends_with_v1Exempted · defensive — a base already ending in /v1 always appends only /ocr, so appends_ocr_only cannot be false here in a correct build (reviewed: agent:claude-opus-4-8)
3FTFFappends_ocr_onlyExempted · defensive — a caller base that is neither absent nor /v1-terminated always appends /v1/ocr, so appends_ocr_only cannot be true here in a correct build (reviewed: agent:claude-opus-4-8)
4TFFFapi_base_is_noneExempted · defensive — the default base ends in /v1 so an absent api_base always appends only /ocr, making appends_ocr_only false unreachable here in a correct build (reviewed: agent:claude-opus-4-8)

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.

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
0
Files
2
Tests
1
At-risk contracts
0

Files to re-check (2)

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

Tests to re-run (1)

  • 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.

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