Proof Portal
litellm
BerriAI117 findings · 107 requirementsLiteLLM Python->Rust migration audit (proof mirroring).
Python<->Rust divergence: model-gated speed-param drop not ported to Rust /v1/messages
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.
AUDIT/divergence finding (no code changed). When a model id is supplied, Python invokes AnthropicConfig._maybe_drop_speed_param, which under drop_params strips the 'speed' param for models that do not support it (SW-REQ-260730-JWPY: the drop step runs iff model is not None). The Rust /v1/messages surface has no model-gated speed-drop step and no drop_params plumbing at all: MessagesRequest carries no drop_params field, transform_request for native Anthropic is the default passthrough, and 'speed' is a typed passthrough field on AnthropicMessagesRequest that is always forwarded when present. Default behavior (no drop_params) agrees; the two diverge only under drop_params=true against an unsupported model, where Python drops 'speed' and Rust keeps it. Portable but not yet ported.
Evidence disposition (issue #392): the divergence is that Rust does not port the Python behavior. The Python test named in reproducer_command is a Verifies-style conformance test that confirms the CORRECT Python pole; it is not a Reproduces-style bug tripwire and cannot witness the Rust-side absence (litellm-rust/ is outside the Python verification_scope). Stamping a passing conformance test as known_issue_reproduced would overclaim, so no current evidence row is stamped. Reviewed and accepted as honest tracked debt below the runnable-reproducer floor.
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.
- Anthropic /v1/messages: Python -> RustMIR-002Not yet ported to RustPython → 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.
- AnthropicMessagesRequestUtils.get_requested_anthropic_messages_optional_param (model-gated _maybe_drop_speed_param step)
Reproduction steps
Technical steps for your engineers to confirm the issue by hand.
uv run pytest tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_request_optional_param_utils.py -k 'drop_params_strips_speed_for_unsupported_model or speed_kept_when_no_model'
What protects you, and the fix
What limits your exposure today, and the planned remediation.
What protects you now
Divergence is limited to drop_params=true + unsupported model; do not rely on Rust to strip unsupported speed.
The fix
Plumb drop_params into the Rust messages path and add a model-gated speed-drop transform to match Python. AUDIT/divergence 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 · 1 code files · 2 tests.
- utils.py
- transformation.rs
- test_request_optional_param_utils.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.