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

transform_responses_api_request and transform_compact_response_api_request validate the input, strip cache_control from input and tools, reassign the stripped tools onto the request params if and only if tools were present, and build the ResponsesAPIRequestParams body (the compact variant appends /compact to the api_base path)

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

Specification

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

Description

transform_responses_api_request and transform_compact_response_api_request validate the input, strip cache_control from input and tools, reassign the stripped tools onto the request params if and only if tools were present, and build the ResponsesAPIRequestParams body (the compact variant appends /compact to the api_base path)

FRETish formula
the openai_responses shall always satisfy (tools_reassigned <-> tools_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 31, 2026, 00:00 UTC · Claude Code · AI agent
Modified
Jul 31, 2026, 00:00 UTC · Claude Code · AI agent

Hazard review

Reviewed Jul 31, 2026, 00:00 UTCby agent:claude-codecatalog v1.9.0
  • scenarioreviewednominalmalformed_input

    nominal builds the request body and reassigns present tools; malformed_input is the loose input item normalized (pydantic-to-dict, reasoning-null-filter) before the body is assembled. empty_input (no tools) is the vacuous skip of the tools reassignment folded into nominal

  • propertynot applicable

    The request build is a finite assemble-and-conditionally-reassign step, not an algebraic property surface; the tools biconditional is captured by the nominal scenario

  • structuralnot applicable

    Garbage-collected Python dict assembly and httpx.URL path edit with no manual memory, pointer arithmetic, overflow, or format string

  • domainnot applicable

    The request build assembles a URL and body dict and opens no connection; the http-client domain classes bind to the out-of-scope handler that POSTs the body

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 31, 2026 · 4 months agoREVIEW-23

    transform_responses_api_request (line 161 'if tools is not None: response_api_optional_request_params["tools"]=tools') and transform_compact_response_api_request (line 635 same gate) reassign stripped tools only when present, after _validate_input_param + cache_control strip, then build ResponsesAPIRequestParams. FRETish tools_reassigned <-> tools_present matches the 'if tools is not None' reassignment gate on both builders.

    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.

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

Behavior when inputs are syntactically or structurally invalid.

Discharging evidence2/2 required witnessed
  • negativerequiredpresent
    Covered by 1 test
  • nominalrequiredpresent
    Covered by 1 test

Code signals

Static-analysis signals from external scanners that bear on this requirement's obligations — the source location, the obligation each touches, and its closure status.

  • Missingbuiltinunordered_set_to_output
    Obligation: Determinism · Property

    Output identical regardless of collection ordering or runtime conditions.

    OpenAIResponsesAPIConfig.get_supported_openai_params: list(set(...)) — no total order

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 openai_responses shall always satisfy (tools_reassigned <-> tools_present)

Witnesses· 1 scenario total

  • test_main_and_compact_request_build_with_and_without_tools
    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
#tools_presenttools_reassignedResultProvesCovering test
1FFTtools_present
2FTFtools_reassignedExempted · defensive — the reassignment runs only inside `if tools is not None`, so reassigning absent tools is unreachable in a correct build (reviewed: agent:claude-opus-4-8)
3TFFtools_presentExempted · defensive — present tools are always reassigned after stripping, so skipping the reassignment 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.

  • OpenAI Responses API: Python -> RustMIR-003
    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
1
At-risk contracts
0

Files to re-check (1)

  • transformation.pylitellm/llms/openai/responses/transformation.py

Tests to re-run (1)

  • test_openai_responses_transformation.pytests/test_litellm/llms/openai/responses/test_openai_responses_transformation.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