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

get_requested_anthropic_messages_optional_param forwards a candidate param into the filtered result if and only if its key is in the AnthropicMessagesRequestOptionalParams allowlist AND its value is not None; unknown keys and None-valued keys are dropped

All automated checks pass and 4/4 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 forwards a candidate param into the filtered result if and only if its key is in the AnthropicMessagesRequestOptionalParams allowlist AND its value is not None; unknown keys and None-valued keys are dropped

FRETish formula
the anthropic_messages shall always satisfy (param_forwarded <-> (param_key_supported & param_value_present))
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
  • scenarioreviewednominalempty_input

    Allowlist forwarding is the nominal partition (supported non-null param kept, unknown/None dropped); empty_input is the empty-dict partition returning {}. malformed_input is suppressed because an unknown key or a None value is a well-formed dict entry that is filtered, not a structurally-invalid input this pure filter must reject

  • propertyreviewedpure_function_property_testedtotality

    get_requested_anthropic_messages_optional_param is pure (output=f(inputs), no I/O), so its subset-of-allowlist and drop-None properties are property-testable (pure_function_property_tested) and totality holds over any params dict. determinism (collection-ordering) and idempotency are covered on the sibling memoization/dispatch requirements, not restated here

  • structuralnot applicable

    Implementation is garbage-collected Python operating on a dict comprehension; there is no manual memory, pointer arithmetic, fixed-width overflow, or user-controlled format string for the structural language-safety classes to bind to

  • domainnot applicable

    This is a pure in-process dict filter that issues zero network/filesystem/IPC calls; the external-call, http-client, parser, and crypto domain classes have no I/O construct to bind to here

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

    get_requested_anthropic_messages_optional_param line 46: filtered_params = {k: v for k, v in params.items() if k in valid_keys and v is not None}. FRETish (param_forwarded <-> (param_key_supported & param_value_present)) matches: a param is kept iff its key is in the allowlist (k in valid_keys) AND its value is present (v is not None); both conjuncts gate forwarding, so an unknown key or a None value is dropped.

    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.

4 obligations · 4 discharged

Browse the catalogue
Discharged

Happy-path behavior with valid inputs.

If it were violatedMedium

If the biconditional breaks, a supported non-null param such as temperature or tools is silently dropped so the caller's request is degraded with no error, or an unknown key leaks downstream and the Anthropic API rejects the request with a 400.

Discharging evidence1/1 required witnessed
  • nominalrequiredpresent
    Covered by 3 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 filter were impure and carried hidden state, identical params could yield different filtered results across requests, making the parse boundary nondeterministic and its subset-of-allowlist and drop-None properties untestable.

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

Behavior when inputs are absent, nil, zero-length, or blank.

If it were violatedLow

If an empty params dict raised instead of returning an empty result, a /v1/messages request carrying no optional params would crash the request-parse path instead of proceeding cleanly.

Discharging evidence1/1 required witnessed
  • nominalrequiredpresent
    Covered by 1 test
Discharged

Every reachable input combination is covered by a requirement.

If it were violatedMedium

If some well-formed params dict caused the filter to raise instead of returning a value, an unhandled exception would surface from the /v1/messages parse path as a 500 rather than a narrowed optional-param result.

Discharging evidence1/1 required witnessed
  • nominalrequiredpresent
    Covered by 1 test

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 (param_forwarded <-> (param_key_supported & param_value_present))

Witnesses· 2 scenarios total

  • test_supported_present_kept_and_unset_or_unknown_dropped
    exercises 2 condition scenarios

MC/DC truth table· 5 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
#param_forwardedparam_key_supportedparam_value_presentResultProvesCovering test
1FFFTparam_forwarded
2TFFFparam_forwardedExempted · defensive — an unknown key with a None value is never forwarded; the biconditional forbids param_forwarded=T when neither condition holds, so this row is unreachable in a correct build (reviewed: agent:claude-opus-4-8)
3TFTFparam_key_supportedExempted · defensive — allowlist membership gates forwarding, so an unknown key can never be forwarded even with a present value; unreachable in a correct build (reviewed: agent:claude-opus-4-8)
4TTFFparam_value_presentExempted · defensive — a None value is dropped by the `v is not None` conjunct even for a supported key, so a forwarded None is unreachable in a correct build (reviewed: agent:claude-opus-4-8)
5TTTTparam_key_supported

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
    InheritedPython → 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
1
At-risk contracts
0

Files to re-check (1)

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

Tests to re-run (1)

  • 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