Proof Portal
litellm
BerriAI117 findings · 107 requirementsLiteLLM Python->Rust migration audit (proof mirroring).
Python->Rust divergence: Rust Vertex rawPredict host mapping differs for global and multi-region locations
Medium-severity issue, currently open.
How well is this finding proven?
- 1.Reported / candidate
Complete
- 2.Reproducer written
Complete
View reproducer - 3.Reproduces (recorded run)
Not yet established
View evidence - 4.Independently re-run
Not yet established
- 5.Meets quality standard
Not assessed
- 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.
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-006Defect in the Rust port itselfPython → RustView in Mirrors
Severity, explained
Why this is rated the way it is — and the scoring signals behind the rating (each ⓘ explains the term).
- why this rating
- Risk-rated
- risk area
- Correctness
- 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.
// Reproduces: markercd 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.
Touch this finding and you re-check 1 requirements · 2 code files · 0 tests.
- transformation.rs
- transformation.py
Per-requirement evidence
For each requirement this finding touches: the implementing code, verifying tests, and proof obligations that discharge it.
Per-requirement evidence
For each requirement this finding touches: the implementing code, verifying tests, and proof obligations that discharge it.
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.