Proof Portal

Project overview

litellm

BerriAI117 findings · 107 requirements

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

Back to findings
Known issueKI-vertex-ocr-rust-endpoint-host-divergence

Python->Rust divergence: Rust Vertex rawPredict host mapping differs for global and multi-region locations

OpenOpenMedium

Medium-severity issue, currently open.

How well is this finding proven?

  1. 1.Reported / candidate

    Complete

  2. 2.Reproducer written

    Complete

    View reproducer
  3. 3.Reproduces (recorded run)

    Not yet established

    View evidence
  4. 4.Independently re-run

    Not yet established

  5. 5.Meets quality standard

    Not assessed

  6. 6.Validated for submission

    Not assessed

Recorded runs show whether the issue reproduces. Independent re-runs are shown separately. A later review does not fill in a missing earlier step.

Description

The issue as recorded.

Cross-language parity finding for MIR-006. When api_base is absent the Python get_complete_url derives the host via get_vertex_base_url(vertex_location) (litellm/llms/vertex_ai/common_utils.py:336): "global" -> https://aiplatform.googleapis.com, a multi-region geography such as "eu" -> https://aiplatform.eu.rep.googleapis.com, and a regional location such as "us-central1" -> https://us-central1-aiplatform.googleapis.com. The Rust vertex_mistral_api_base (litellm-rust/crates/core/src/providers/vertex_ai/ocr/transformation.rs:87) always formats https://{location}-aiplatform.googleapis.com. Hostile/degenerate input: vertex_location="global" or "eu" with no explicit api_base. Outcome under the Rust path: it builds https://global-aiplatform.googleapis.com / https://eu-aiplatform.googleapis.com, which are the wrong hosts and do not resolve to the correct Vertex control plane, so the request is misrouted. Regional locations (the row exercised by the mirror-annotated Rust test) match; only global/multi-region diverge.

Reachability

Evidence disposition (issue #392): the divergence is traced by comparing get_vertex_base_url (Python) to vertex_mistral_api_base (Rust) at the file:line above; the Rust module is outside the Python verification_scope in proof.yaml so no in-scope evidence row can be stamped. Accepted as honest tracked debt; no evidence hash is fabricated.

Affected requirements

The requirement(s) this issue violates — click through to the spec.

Port parity

How this finding relates to the port: whether the behaviour diverges, isn't ported yet, was fixed, or matches across both implementations.

  • Vertex AI OCR: Python -> RustMIR-006
    Defect in the Rust port itselfPython → Rust
    View in Mirrors

Severity, explained

Why this is rated the way it is — and the scoring signals behind the rating (each ⓘ explains the term).

MediumRated severity — the impact if this issue is exploited or hit.
why this rating
Risk-rated
risk area
Correctness
Security classification
Not a security surface
CVE surface
None

Where it is

The code the issue lives in — peek the affected function inline to see it in context.

  • providers::vertex_ai::ocr::transformation::vertex_mistral_api_base (Rust) vs get_vertex_base_url (Python)

Reproducer and evidence

The recorded reproducer and its evidence-run outcome. Inspect the test and source, or run the command to check the behavior yourself.

Recorded
Reproducer test
from // Reproduces: marker
Run it yourself
cd litellm-rust && cargo test -p litellm-core providers::vertex_ai::ocr::transformation::tests::vertex_mistral_url_global_and_multiregion_hosts_diverge -- --nocapture

Reproduction steps

Technical steps for your engineers to confirm the issue by hand.

cd litellm-rust && cargo test -p litellm-core providers::vertex_ai::ocr::transformation::tests::vertex_mistral_url_global_and_multiregion_hosts_diverge -- --nocapture

What protects you, and the fix

What limits your exposure today, and the planned remediation.

What protects you now

Map "global" and multi-region geographies to their correct hosts in vertex_mistral_api_base, mirroring get_vertex_base_url, instead of the single {location}-aiplatform template.

The fix

Port the global / multi-region / regional host branches of get_vertex_base_url into the Rust base builder, then add Rust tests for the global and eu rows.

Blast radius

If you touch this issue, what else may need re-checking — the requirements it affects and the code and tests that hang off them. Historical view: authored trace links only — automatically derived links aren't reconstructible for past runs.

Tracing blast radius…

Touch this finding and you re-check 1 requirements · 2 code files · 0 tests.

Requirements (1)
Code files (2)
  • transformation.rs
  • transformation.py

Per-requirement evidence

For each requirement this finding touches: the implementing code, verifying tests, and proof obligations that discharge it.

Implementing code (2)
  • litellm-rust/crates/core/src/providers/vertex_ai/ocr/transformation.rs
    complete_vertex_mistral_url
  • litellm/llms/vertex_ai/ocr/transformation.py
Tests & evidence (2)
  • docs/requirements/vertex_ocr.md
  • litellm-rust/crates/core/src/providers/vertex_ai/ocr/transformation.rs
Proof obligations (3)
empty_input

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

  • ✓nominal (required) — litellm-rust/crates/core/src/providers/vertex_ai/ocr/transformation.rs:526
nominal

Happy-path behavior with valid inputs.

  • ✓nominal (required) — litellm-rust/crates/core/src/providers/vertex_ai/ocr/transformation.rs:390
totality

Every reachable input combination is covered by a requirement.

  • ✓nominal (required) — litellm-rust/crates/core/src/providers/vertex_ai/ocr/transformation.rs:527

Change history

Every recorded revision of this finding's source file — when it was added, edited, or re-classified, with the diff for each change.

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