Proof Portal

Project overview

litellm

BerriAI117 findings · 107 requirements

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

Back to findings
Known issueKI-responses-gpt5-temperature-not-enforced

Python->Rust: gpt-5 temperature validation (error-raise vs drop) absent in Rust

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

  4. 4.Independently re-run

    Not yet established

  5. 5.Meets quality standard

    Needs attention

  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.

MIR-003 divergence (SW-REQ-TEMP + SW-REQ-G5MC). Python map_openai_params, for a model classified by _is_gpt_5_model as an actual OpenAI gpt-5 model (no foreign provider prefix, contains gpt-5, not gpt-5-chat), rejects temperature != 1: it raises litellm.UnsupportedParamsError(status_code=400) UNLESS the caller set drop_params (then it silently drops temperature) OR the model supports reasoning.effort='none' and effort is none/unset (then flexible temperature is allowed). Rust performs no gpt-5 classification and no temperature validation anywhere; the WS enforce_model path only overwrites the model field. Net user-visible divergence: a gpt-5 Responses request with temperature=0.5 that Python 400s (or drops) would not be validated by Rust. This is the 'error-raise vs silent' and 'gpt-5 detection' divergence class. Portable-but-not-yet-ported; MIR-003 cells stay honest debt. No behavior changed.

Reachability

Evidence disposition (issue #392): this finding documents an ABSENCE in the Rust target (litellm-rust/crates/, outside the Python verification_scope in proof.yaml), established by the static grep/read recorded in reproducer_command. There is no runnable Python-scope tripwire that can reproduce a Rust-side absence, so proof evidence refresh cannot stamp a current evidence row. Reviewed and accepted as honest tracked debt below the runnable-reproducer floor; fabricating an evidence hash would be dishonest.

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 Responses API: Python -> RustMIR-003
    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).

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.

  • OpenAIResponsesAPIConfig.map_openai_params / _is_gpt_5_model (Python) vs Rust (none)

Reproduction steps

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

grep -rniE 'is_gpt_?5|UnsupportedParams|temperature' litellm-rust/crates/core/src/providers/openai/responses litellm-rust/crates/core/src/responses (no matches)

What protects you, and the fix

What limits your exposure today, and the planned remediation.

What protects you now

Python path enforces gpt-5 temperature; Rust WS transport does not carry HTTP param mapping.

The fix

Port _is_gpt_5_model + gpt-5 temperature validation to Rust. 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.

Tracing blast radius…

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

Code files (1)
  • transformation.py
Tests (1)
  • test_openai_responses_transformation.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/openai/responses/transformation.py
    OpenAIResponsesAPIConfig.map_openai_params
Tests & evidence (2)
  • docs/requirements/openai_responses.md
  • tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py
Proof obligations (2)
error_handling

Behavior when operations fail or dependencies are unavailable.

  • ✓negative (required) — tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1673
  • ✓nominal (required) — tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1630
nominal

Happy-path behavior with valid inputs.

  • ✓nominal (required) — tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1613, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1629, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1643, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1660
Implementing code (1)
  • litellm/llms/openai/responses/transformation.py
    OpenAIResponsesAPIConfig._is_gpt_5_model
Tests & evidence (2)
  • docs/requirements/openai_responses.md
  • tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py
Proof obligations (3)
nominal

Happy-path behavior with valid inputs.

  • ✓nominal (required) — tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1571
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) — tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1572
totality

Every reachable input combination is covered by a requirement.

  • ✓nominal (required) — tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1573
Tests & evidence (2)
  • docs/requirements/openai_responses.md
  • tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py
Proof obligations (3)
error_handling

Behavior when operations fail or dependencies are unavailable.

  • ✓negative (required) — tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1675, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1674
malformed_input

Behavior when inputs are syntactically or structurally invalid.

  • ✓negative (required) — tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1763, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1762
  • ✓nominal — tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1761
nominal

Happy-path behavior with valid inputs.

  • ✓nominal — tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1575, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1696, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1726, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1937, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1995, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1574, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1598, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1631, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1695, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1725, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1833, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1871, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1895, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1936, tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py:1994

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