Proof Portal
litellm
BerriAI117 findings · 107 requirementsLiteLLM Python->Rust migration audit (proof mirroring).
93 withheld (location undisclosed)
As a caller of the OpenAI Responses API through LiteLLM, I need my request narrowed and normalized to what OpenAI accepts (gpt-5 temperature validated, sub-minimum max_output_tokens raised to the API floor, Anthropic-only cache_control markers stripped, reasoning items with null fields cleaned), the correct /responses endpoint targeted and my request authenticated, streaming events dispatched to their typed model, and fake-streaming chosen only when the model cannot stream natively, so my Responses API requests parse cleanly and reach OpenAI in a shape it accepts
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 OpenAI Responses API through LiteLLM, I need my request narrowed and normalized to what OpenAI accepts (gpt-5 temperature validated, sub-minimum max_output_tokens raised to the API floor, Anthropic-only cache_control markers stripped, reasoning items with null fields cleaned), the correct /responses endpoint targeted and my request authenticated, streaming events dispatched to their typed model, and fake-streaming chosen only when the model cannot stream natively, so my Responses API requests parse cleanly and reach OpenAI in a shape it accepts
Rationale & tags
Why this requirement exists, and how it is categorised.
Rationale & tags
Why this requirement exists, and how it is categorised.
The OpenAI Responses API transform is the pure request/response transform boundary mirroring the Rust core/providers responses transform; its param validation, request build, endpoint/auth construction, response parse, streaming-event dispatch, and fake-stream gating must be specified and verified so requests reach OpenAI in an accepted shape
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 31, 2026, 00:00 UTC · Claude Code · AI agent
- Modified
- Jul 31, 2026, 00:00 UTC · Claude Code · AI agent
Hazard review
- scenarioreviewednominalerror_handlingmalformed_input
Stakeholder aggregate carries the transform partitions: nominal builds a well-formed request and parses a well-formed response, error_handling raises the mapped unsupported-params error for a gpt-5 temperature that cannot be honored, malformed_input covers the pydantic-to-dict and reasoning-null normalization of structurally-loose input items; these decompose into the openai_responses SW-REQs
- propertynot applicable
Cross-cutting algebraic property invariants are discharged at the child SW-REQ level (pure-function classification and endpoint construction); 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 scoped transform boundary builds request dicts, URLs and headers and parses already-fetched httpx responses; it opens no socket itself, so the external-call and http-client domain classes bind to the out-of-scope BaseLLMHTTPHandler call path, not to this aggregate
Change history
Every recorded revision of this requirement's source file — newest first, each with its commit message and the diff for that change.
Open known issues
Findings currently open against this requirement — issues its verification surfaced that are not resolved yet. Each links to the full finding.
- MediumOpen
Python->Rust: Anthropic cache_control strip on Responses input/tools absent in Rust (pattern exists on messages surface)
KI-responses-cache-control-strip-absent
- MediumOpen
Python->Rust: gpt-5 temperature validation (error-raise vs drop) absent in Rust
KI-responses-gpt5-temperature-not-enforced
- MediumOpen
Python->Rust: sub-minimum max_output_tokens floor (<16 -> 16) absent in Rust
KI-responses-max-output-tokens-floor-absent
- LowOpen
Python->Rust: typed streaming-event dispatch + null error.code coalesce absent (Rust WS passthrough is untyped)
KI-responses-streaming-typed-dispatch-divergence
Obligations
What this requirement must witness to be considered satisfied — the required evidence, and the tests that discharge each one.
3 obligations · 3 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.
- nominalrecommendedpresent
Behavior when operations fail or dependencies are unavailable.
- negativerequiredpresentCovered by 2 tests
Behavior when inputs are syntactically or structurally invalid.
- negativerequiredpresentCovered by 2 tests
- nominalrecommendedpresentCovered by 1 test
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 gpt-5 request whose temperature cannot be honored is rejected with the mapped unsupported-params error unless drop_params is set, in which case the temperature is dropped
Derived requirementsVerification rationaleVerified by analysis of SYS-REQ-260730-RSP1 (responses_transform_contract_honored), which decomposes into the gpt-5 temperature-disposition SW-REQ modeled by the gpt5_temperature_disposition decision table; the unit tests assert the mapped error is raised, the temperature dropped under drop_params, and flexible temperature kept when reasoning.effort is none/absent on a supporting model. See specs/software and tests/test_litellm/llms/openai/responses/test_openai_responses_transformation.py
- AC-002verify: analysis
A request forwards to the canonical /responses endpoint with a Bearer Authorization header, with cache_control markers stripped and reasoning-item null fields removed, and a sub-minimum max_output_tokens raised to the API floor
Derived requirementsVerification rationaleVerified by analysis of SYS-REQ-260730-RSP1, which decomposes into the endpoint-URL, auth, request-build, cache-control-strip, reasoning-normalize and token-floor SW-REQs; the unit tests assert the endpoint shape, the Bearer header, the stripped cache_control keys, the cleaned reasoning items, and the floored token count. 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.
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.
- OpenAI Responses API: Python -> RustMIR-003Not portedPython → 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
Requirements (11)
- The OpenAI Responses API transform shall honor its…openai_responses · SYS
- remove_cache_control_flag_from_input_and_tools applies the…openai_responses · SW
- should_fake_stream enables fake-streaming if and only if…openai_responses · SW
- _is_gpt_5_model classifies a model as an actual OpenAI…openai_responses · SW
- transform_list_input_items_request includes each optional…openai_responses · SW
- _validate_input_param converts pydantic input items to…openai_responses · SW
- transform_responses_api_request and…openai_responses · SW
- map_openai_params dispatches a gpt-5 temperature per the…openai_responses · SW
- _enforce_min_max_output_tokens raises max_output_tokens to…openai_responses · SW
- get_complete_url resolves the effective api_base (caller…openai_responses · SW
- validate_environment resolves the API key from…openai_responses · SW
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.