Proof Portal
litellm
BerriAI117 findings · 107 requirementsLiteLLM Python->Rust migration audit (proof mirroring).
93 withheld (location undisclosed)
get_api_key resolves the effective OpenAI Realtime api_key as the first truthy source in the precedence chain (caller api_key, litellm.api_key, litellm.openai_key, OPENAI_API_KEY env, else the empty string), returning a string for every source class and never raising when the whole chain is unset
Specification
The requirement exactly as authored — its complete prose text and, where present, the formal FRETish sentence it compiles to.
get_api_key resolves the effective OpenAI Realtime api_key as the first truthy source in the precedence chain (caller api_key, litellm.api_key, litellm.openai_key, OPENAI_API_KEY env, else the empty string), returning a string for every source class and never raising when the whole chain is unset
the openai_realtime shall always satisfy api_key_resolved
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
- scenarioreviewednominalempty_input
nominal is the resolution happy path over the finite api_key source classes (explicit, litellm_api_key, litellm_openai_key, env_var) enumerated in the api_key_resolution table; empty_input is the fully-unset chain (all sources falsy) falling through to the empty-string sentinel; a source value is always a string or None, so there is no malformed partition distinct from the none_present class
- propertyreviewedpure_function_property_testedtotality
get_api_key is a pure resolver (output depends only on the caller arg and the litellm/env config it reads, with no I/O of its own beyond the config read), so the first-truthy-source property is property-testable and total over any source combination; determinism follows from purity
- structuralnot applicable
Garbage-collected Python short-circuit or-chain over strings with no manual memory, pointer arithmetic, overflow, or format string
- domainnot applicable
Pure in-process credential resolution issuing no network/filesystem/IPC call; the env read is a process-config lookup, not an external service call. The resolved secret is returned to the caller, 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-25
api_key_resolved is the always-holds guarantee over the 5-term short-circuit or-chain 'api_key or litellm.api_key or litellm.openai_key or get_secret_str(OPENAI_API_KEY) or ""'. No if/match gates it; the trailing '' sentinel makes the chain total and non-raising when every source is falsy. Formula matches: a string is always returned, so the guarantee holds for every source class in the api_key_resolution table.
Cited code (1)
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.
Precedence inverts so a stale litellm.api_key or litellm.openai_key global shadows the caller's explicit api_key argument, and the realtime session is authenticated as and billed to the wrong OpenAI account rather than the caller's
- nominalrequiredpresentNo covering test recorded
Behavior when inputs are absent, nil, zero-length, or blank.
- 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
Every reachable input combination is covered by a requirement.
get_api_key raises on a fully-unset chain instead of returning the empty-string sentinel, so the realtime session aborts with an unhandled exception rather than surfacing a clean downstream 401, turning a missing-key config error into an availability failure
- 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 api_key_resolved
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| # | api_key_resolved | Result | Proves | Covering test |
|---|---|---|---|---|
| 1 | F | F | api_key_resolved | Exempted · defensive — get_api_key always returns a string (a resolved source or the "" sentinel) and never raises, so an unresolved key is unreachable in a correct build (reviewed: agent:claude-opus-4-8) |
| 2 | T | T | api_key_resolved | — |
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.