Proof Portal
litellm
BerriAI117 findings · 107 requirementsLiteLLM Python->Rust migration audit (proof mirroring).
93 withheld (location undisclosed)
As a caller of the Anthropic /v1/messages interface, I need request parameters narrowed to the supported optional-param allowlist (unknown keys and unset/None values dropped), the speed param dropped only when a model is known to not support it, and mock-response directives mapped to the correct typed error or a well-formed Anthropic response, so my /v1/messages requests parse cleanly and mocked flows behave predictably
Specification
The requirement exactly as authored — its complete prose text and, where present, the formal FRETish sentence it compiles to.
As a caller of the Anthropic /v1/messages interface, I need request parameters narrowed to the supported optional-param allowlist (unknown keys and unset/None values dropped), the speed param dropped only when a model is known to not support it, and mock-response directives mapped to the correct typed error or a well-formed Anthropic response, so my /v1/messages requests parse cleanly and mocked flows behave predictably
Rationale & tags
Why this requirement exists, and how it is categorised.
Rationale & tags
Why this requirement exists, and how it is categorised.
The Anthropic /v1/messages request-param utility is the pure request-parse boundary for the messages interface; its allowlist narrowing, model-gated speed drop, and mock-response dispatch must be specified and verified so requests parse cleanly and mocked flows behave predictably
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:38 UTC · Claude Code · AI agent
- Modified
- Aug 1, 2026, 18:42 UTC · Claude Opus 4 8 · AI agent
Hazard review
- scenarioreviewednominalerror_handling
Stakeholder aggregate carries the utility partitions: nominal allowlist narrowing and well-formed mock response, error_handling for the sentinel directives that raise their mapped typed exception; these decompose into the anthropic_messages SW-REQs
- propertynot applicable
Cross-cutting algebraic property invariants are discharged at the child SW-REQ level (pure-function/determinism on the filter and memoization); the informal stakeholder aggregate has no runtime code of its own
- structuralnot applicable
Informal stakeholder aggregate over garbage-collected Python with no manual memory, pointer arithmetic, overflow, or format string
- domainnot applicable
The request-param utility performs zero network/filesystem/IPC I/O; external-call and http-client domain classes have no construct to bind to
Change history
Every recorded revision of this requirement's source file — newest first, each with its commit message and the diff for that change.
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 catalogueEvidence tagged via <REQ> is witnessed by a requirement that satisfies this one — normal for stakeholder / aggregate requirements, which are proven through the requirements that refine them.
Happy-path behavior with valid inputs.
If request params were not narrowed to the supported non-null allowlist, a caller's /v1/messages request would carry silently-dropped or leaked params, degrading generation or triggering provider rejection.
- nominalrecommendedpresentCovered by 4 tests
Behavior when operations fail or dependencies are unavailable.
If mock-response directives were not mapped to their typed error or a well-formed response, mocked caller flows would behave unpredictably and error-injection would not surface the intended exception.
- negativerequiredpresentCovered by 4 tests
- nominalrecommendedpresentCovered by 4 tests
Acceptance criteria
Stakeholder conditions for satisfaction, traced to the derived requirements and evidence that discharge them.
Acceptance criteria
Stakeholder conditions for satisfaction, traced to the derived requirements and evidence that discharge them.
Stakeholder-authored conditions defining when the requirement is satisfied, traced to derived requirements / evidence.
- AC-001verify: analysis
A request whose params include unsupported keys and None values forwards only the supported, non-null optional params
Derived requirementsVerification rationaleVerified by analysis of SYS-REQ-260730-AQZS (messages_util_contract_honored), which decomposes into the allowlist-filter SW-REQ; the unit tests assert unknown keys and None values are dropped while supported non-null params survive. See specs/software and tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_request_optional_param_utils.py
- AC-002verify: analysis
A mock-response directive maps to the correct typed error (for the sentinel directives) or a well-formed Anthropic response (for any other directive)
Derived requirementsVerification rationaleVerified by analysis of SYS-REQ-260730-AQZS, which decomposes into the mock-response dispatch SW-REQ modeled by the mock_response_dispatch decision table; the unit tests assert each sentinel raises its mapped typed exception and any other directive returns a well-formed response. See specs/software and the mapped test file
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.
No implementation linked
No source files are traced to this requirement yet.
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
Requirements (5)
- The Anthropic /v1/messages request-param utility shall…anthropic_messages · SYS
- the AnthropicMessagesRequestOptionalParams key allowlist is…anthropic_messages · SW
- mock_response maps each mock-response directive string to…anthropic_messages · SW
- get_requested_anthropic_messages_optional_param forwards a…anthropic_messages · SW
- get_requested_anthropic_messages_optional_param invokes the…anthropic_messages · SW
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.