Proof Portal

Project overview

litellm

BerriAI117 findings · 107 requirements

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

93 withheld (location undisclosed)

All requirements
RequirementSW-REQ-260730-JWPYSoftwareReview

get_requested_anthropic_messages_optional_param invokes the model-aware speed-param drop step if and only if a model id was supplied (model is not None); with no model the filtered params are returned without the drop step

All automated checks pass and 2/2 obligations are satisfied. Human review is still pending.
PriorityshallTypeguaranteeCategoryfunctionalComponentanthropic_messagesAssuranceEFindingsLowworst open

Specification

The requirement exactly as authored — its complete prose text and, where present, the formal FRETish sentence it compiles to.

Description

get_requested_anthropic_messages_optional_param invokes the model-aware speed-param drop step if and only if a model id was supplied (model is not None); with no model the filtered params are returned without the drop step

FRETish formula
the anthropic_messages shall always satisfy (speed_drop_step_evaluated <-> model_provided)
View full formal model

Verification & provenance

How this requirement was checked: the review trail, edit history, and the machine-analysis status terms (each ⓘ explains what it means).

Assurance levelE
Formalizationvalid
Strategyfretish

Review

Status
pending

History

Created
Jul 30, 2026, 20:39 UTC · Claude Code · AI agent
Modified
Aug 1, 2026, 18:42 UTC · Claude Opus 4 8 · AI agent

Hazard review

Reviewed Aug 1, 2026, 18:42 UTCby agent:claude-opus-4-8catalog v1.9.1
  • scenarioreviewednominal

    The gate is nominal: with a model the speed-drop step runs, without a model a supported param survives verbatim; there is no malformed/empty partition distinct from the sibling allowlist-filter requirement

  • propertyreviewedpure_function_property_tested

    The model-gated drop decision is a pure branch on model is not None with no I/O; the biconditional between model-presence and drop-step-evaluation is property-testable

  • structuralnot applicable

    Garbage-collected Python branch with no manual memory, pointer arithmetic, overflow, or format string

  • domainnot applicable

    Pure in-process branch issuing no network/filesystem/IPC call; the model-capability lookup it delegates to is owned by the sibling AnthropicConfig, not this gate

Change history

Every recorded revision of this requirement's source file — newest first, each with its commit message and the diff for that change.

Review history

Human and AI-agent approvals of this requirement — the 'why was this approved' lineage, each with the reviewer's justification and the code it cites.

  1. Claude Code · AI agentApprovedSpec conformanceJul 30, 2026 · 4 months agoREVIEW-11

    get_requested_anthropic_messages_optional_param line 47: 'if model is not None:' guards the AnthropicConfig._maybe_drop_speed_param call at line 48. FRETish (speed_drop_step_evaluated <-> model_provided) matches: the model-aware speed-drop step is invoked exactly when a model id is supplied; with model None the filtered params are returned without the drop step.

    Cited code (2)

Open known issues

Findings currently open against this requirement — issues its verification surfaced that are not resolved yet. Each links to the full finding.

Obligations

What this requirement must witness to be considered satisfied — the required evidence, and the tests that discharge each one.

2 obligations · 2 discharged

Browse the catalogue
Discharged

Happy-path behavior with valid inputs.

If it were violatedMedium

If the speed-drop gate ran with model=None it could raise on the None-model capability lookup, and if it were skipped when a model is present an unsupported speed param would leak to a model that rejects it, causing a provider 400.

Discharging evidence1/1 required witnessed
  • nominalrequiredpresent
    Covered by 5 tests
Discharged

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.

If it were violatedLow

If the model-presence branch were impure, the drop decision could vary for identical inputs, so the model_provided to drop-evaluated biconditional could not be property-tested reliably.

Discharging evidence1/1 required witnessed
  • nominalrequiredpresent
    Covered by 2 tests

Formula evidence

The formal formula behind this requirement, the variables it is written over, and the tests that exercise it (each term is explained inline).

FRETish formula

the anthropic_messages shall always satisfy (speed_drop_step_evaluated <-> model_provided)

Witnesses· 2 scenarios total

  • transform_narrows_body_keeps_supported_params_and_never_drops_speed
    exercises 1 condition scenario
  • test_supported_present_kept_and_unset_or_unknown_dropped
    exercises 1 condition scenario

MC/DC truth table· 3 rows

Each row assigns the formula's conditions (T/F) and shows the Result— the formula's value for that input row, not a test pass/fail. A row proves a condition when flipping only that condition flips the outcome. The test that covers each row is linked.

Covereda test exercises this rowExempteda reviewed mcdc:ignoreNo-actionfalse-result row satisfied by designUncoveredneeds a covering test
#model_providedspeed_drop_step_evaluatedResultProvesCovering test
1FFTmodel_provided
2FTFspeed_drop_step_evaluatedExempted · defensive — the drop step runs only inside `if model is not None`, so it cannot be evaluated when no model is supplied; unreachable in a correct build (reviewed: agent:claude-opus-4-8)
3TFFmodel_providedExempted · defensive — when a model is supplied the drop step is always invoked; a skipped step with a present model is unreachable in a correct build (reviewed: agent:claude-opus-4-8)

Its place

How this requirement connects — what proves it, what it affects, and what it rests on. Authored links only here; automatically derived links come from the audit index.

Loading graph…

Trace evidence

The concrete artifacts linked to this requirement — implementing code, verifying tests, documents, and the findings raised against it.

Mirrors

Ports this requirement participates in — it carries a reviewed exemption on one side, or a finding raised against it is tracked as part of the port.

  • Anthropic /v1/messages: Python -> RustMIR-002
    Not portedPython → Rust
    View in Mirrors

Impact

Blast radius — authored trace links only (automatically derived links come from the audit index and aren't shown here).

If you change this

Requirements
0
Files
1
Tests
2
At-risk contracts
0

Files to re-check (1)

  • utils.pylitellm/llms/anthropic/experimental_pass_through/messages/utils.py

Tests to re-run (2)

  • transformation.rslitellm-rust/crates/core/src/providers/anthropic/messages/transformation.rs
  • test_request_optional_param_utils.pytests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_request_optional_param_utils.py

What this rests on

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