Proof Portal
litellm
BerriAI117 findings · 107 requirementsLiteLLM Python->Rust migration audit (proof mirroring).
Python->Rust divergence: Rust realtime complete_url omits the litellm.api_base and OPENAI_API_BASE env precedence sources
Low-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
- 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.
Parity finding for MIR-004 SW-REQ-260731-AB40. Python OpenAIRealtimeHTTPConfig.get_api_base resolves the first truthy source across caller -> litellm.api_base -> OPENAI_API_BASE env -> https://api.openai.com default. The Rust realtime complete_url (crates/core/src/providers/openai/realtime/transformation.rs) resolves only two: the caller-supplied api_base (trimmed, blank treated as absent) or the OPENAI_REALTIME_DEFAULT_API_BASE default. The litellm.api_base global and the OPENAI_API_BASE environment source are unported in the Rust core; a deployment relying on OPENAI_API_BASE would silently fall through to the OpenAI default. The AB40 obligation cells (nominal / empty_input / totality / pure-function) are still genuinely met by the Rust resolver's shape, so AB40 is mirrored in MIR-004, but this reduced source set is a real behavioral divergence recorded here. Audit-only; no code changed.
Evidence disposition (issue #392): the reproducer is a Rust cargo test under litellm-rust/, outside the Python verification_scope declared in proof.yaml, so proof evidence refresh cannot execute it or hash its files and no current evidence row can be stamped in this project config. Reviewed and accepted as honest tracked debt below the runnable-reproducer floor; the divergence is witnessed by the named Rust unit test, runnable manually via the cargo command in reproducer_command. 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.
- OpenAI Realtime: Python -> RustMIR-004Diverges on the Rust portPython → 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.
- OpenAIRealtimeHTTPConfig.get_api_base (Python, 4-source) vs providers::openai::realtime::transformation::complete_url (Rust, caller-or-default)
Reproduction steps
Technical steps for your engineers to confirm the issue by hand.
cargo test -p litellm-core --lib providers::openai::realtime::transformation::tests::complete_url_custom_base (pins caller-or-default resolution; no env/global source exists to test)
What protects you, and the fix
What limits your exposure today, and the planned remediation.
What protects you now
Callers to the Rust realtime path must pass api_base explicitly; OPENAI_API_BASE and litellm.api_base are not consulted.
The fix
Add the litellm.api_base and OPENAI_API_BASE precedence sources to the Rust realtime base resolution to fully match Python, or accept the narrowed contract deliberately. Audit finding only.
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
- http_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.