Proof Portal
litellm
BerriAI117 findings · 107 requirementsLiteLLM Python->Rust migration audit (proof mirroring).
93 withheld (location undisclosed)
validate_environment merges the caller-supplied headers and always sets a Bearer Authorization header from the effective api_key (defaulting to an empty Bearer value when no key is supplied) and a defaulted application/json Content-Type, returning a headers dict that carries both auth and content-type for every request
Specification
The requirement exactly as authored — its complete prose text and, where present, the formal FRETish sentence it compiles to.
validate_environment merges the caller-supplied headers and always sets a Bearer Authorization header from the effective api_key (defaulting to an empty Bearer value when no key is supplied) and a defaulted application/json Content-Type, returning a headers dict that carries both auth and content-type for every request
the openai_realtime shall always satisfy realtime_auth_header_set
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
- Aug 1, 2026, 18:19 UTC · Claude Opus 4 8 · AI agent
Hazard review
- scenarioreviewednominal
nominal is the header assembly over a present or absent api_key; a missing key is not a distinct behavioral partition because the api_key or "" fallback still sets a (blank Bearer) Authorization header rather than omitting it
- propertyreviewedpure_function_property_tested
validate_environment is a pure dict builder (output depends only on the headers arg and api_key), so the always-sets-Bearer-and-Content-Type property is property-testable; determinism follows from purity and totality is trivial over the two-way present/absent key partition already covered by nominal
- structuralnot applicable
Garbage-collected Python dict spread with an f-string over a trusted literal template; no manual memory, pointer arithmetic, overflow, or user-controlled format string
- domainnot applicable
Pure in-process header assembly issuing no network/filesystem/IPC call; the Bearer secret is placed into the returned headers dict for the out-of-scope handler to send, not logged at this boundary
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 31, 2026 · 4 months agoREVIEW-27
realtime_auth_header_set is the always-holds guarantee over the dict spread that unconditionally writes 'Authorization': f'Bearer {api_key or ""}' and 'Content-Type': 'application/json' over the caller headers. The only decision is the inner 'api_key or ""' fallback (present key vs blank), not a header-omission branch; the formula matches: both keys are always set regardless of api_key presence.
Cited code (1)
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 catalogueHappy-path behavior with valid inputs.
The Authorization header is omitted from the merged dict or a caller-supplied Authorization survives the merge, so the realtime credential/SDP request goes out unauthenticated (fails closed at OpenAI) or carries an unintended credential instead of the effective api_key Bearer
- nominalrequiredpresentNo covering test recorded
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.
- nominalrequiredpresentNo covering test recorded
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 openai_realtime shall always satisfy realtime_auth_header_set
MC/DC truth table· 2 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| # | realtime_auth_header_set | Result | Proves | Covering test |
|---|---|---|---|---|
| 1 | F | F | realtime_auth_header_set | Exempted · defensive — validate_environment unconditionally writes both the Authorization and Content-Type keys, so a request without the auth header is unreachable in a correct build (reviewed: agent:claude-opus-4-8) |
| 2 | T | T | realtime_auth_header_set | — |
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.
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)
- http_transformation.pylitellm/llms/openai/realtime/http_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.