Proof Portal
litellm
BerriAI117 findings · 107 requirementsLiteLLM Python->Rust migration audit (proof mirroring).
93 withheld (location undisclosed)
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
Specification
The requirement exactly as authored — its complete prose text and, where present, the formal FRETish sentence it compiles to.
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
the anthropic_messages shall always satisfy (param_forwarded <-> (param_key_supported & param_value_present))
Verification & provenance
How this requirement was checked: the review trail, edit history, and the machine-analysis status terms (each ⓘ explains what it means).
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
- 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.
- 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 catalogueHappy-path behavior with valid inputs.
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.
- nominalrequiredpresentCovered by 3 tests
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 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.
- nominalrequiredpresentCovered by 2 tests
Behavior when inputs are absent, nil, zero-length, or blank.
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.
- nominalrequiredpresentCovered by 1 test
Every reachable input combination is covered by a requirement.
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.
- nominalrequiredpresentCovered 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).
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_droppedexercises 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.
mcdc:ignoreNo-actionfalse-result row satisfied by designUncoveredneeds a covering test| # | param_forwarded | param_key_supported | param_value_present | Result | Proves | Covering test |
|---|---|---|---|---|---|---|
| 1 | F | F | F | T | param_forwarded | |
| 2 | T | F | F | F | param_forwarded | Exempted · 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) |
| 3 | T | F | T | F | param_key_supported | Exempted · 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) |
| 4 | T | T | F | F | param_value_present | Exempted · 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) |
| 5 | T | T | T | T | param_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.
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-002InheritedPython → RustView in Mirrors
Impact
Blast radius — authored trace links only (automatically derived links come from the audit index and aren't shown here).
Impact
Blast radius — authored trace links only (automatically derived links come from the audit index and aren't shown here).
If you change this
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.