Proof Portal

Project overview

litellm

BerriAI117 findings · 107 requirements

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

Back to findings
Known issueKI-messages-speed-drop-not-ported

Python<->Rust divergence: model-gated speed-param drop not ported to Rust /v1/messages

OpenOpenLow

Low-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

  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.

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.

Reachability

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-002
    Not yet ported to RustPython → 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).

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

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

Tracing blast radius…

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

Requirements (1)
Code files (1)
  • utils.py
Tests (2)
  • 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.

Implementing code (1)
  • litellm/llms/anthropic/experimental_pass_through/messages/utils.py
    AnthropicMessagesRequestUtils.get_requested_anthropic_messages_optional_param
Tests & evidence (3)
  • docs/requirements/anthropic_messages.md
  • litellm-rust/crates/core/src/providers/anthropic/messages/transformation.rs
  • tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_request_optional_param_utils.py
Proof obligations (2)
nominal

Happy-path behavior with valid inputs.

  • ✓nominal (required) — litellm-rust/crates/core/src/providers/anthropic/messages/transformation.rs:79, tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_request_optional_param_utils.py:31, tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_request_optional_param_utils.py:79, tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_request_optional_param_utils.py:86, tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_request_optional_param_utils.py:98
pure_function_property_tested

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.

  • ✓nominal (required) — litellm-rust/crates/core/src/providers/anthropic/messages/transformation.rs:80, tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_request_optional_param_utils.py:80

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