Proof Portal

Project overview

litellm

BerriAI117 findings · 107 requirements

LiteLLM Python->Rust migration audit (proof mirroring).

93 withheld (location undisclosed)

All requirements
RequirementSW-REQ-260731-AB40SoftwareReview

get_api_base resolves the effective OpenAI Realtime api_base as the first truthy source in the precedence chain (caller api_base, litellm.api_base, OPENAI_API_BASE env, else the https://api.openai.com default), returning a non-empty base for every source class so the endpoint builders always receive a usable base

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

Specification

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

Description

get_api_base resolves the effective OpenAI Realtime api_base as the first truthy source in the precedence chain (caller api_base, litellm.api_base, OPENAI_API_BASE env, else the https://api.openai.com default), returning a non-empty base for every source class so the endpoint builders always receive a usable base

FRETish formula
the openai_realtime shall always satisfy api_base_resolved
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
Aug 1, 2026, 18:19 UTC · Claude Opus 4 8 · AI agent

Hazard review

Reviewed Aug 1, 2026, 18:25 UTCby agent:claude-opus-4-8catalog v1.9.1
  • scenarioreviewednominalempty_input

    [Redacted: refers to a finding withheld pending disclosure.]

  • propertyreviewedpure_function_property_testedtotality

    get_api_base 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-base resolution issuing no network/filesystem/IPC call; the env read is a process-config lookup, not an external service call

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

    api_base_resolved is the always-holds guarantee over the 4-term short-circuit or-chain 'api_base or litellm.api_base or get_secret_str(OPENAI_API_BASE) or "https://api.openai.com"'. No if/match gates it; the or precedence is the decision structure and the trailing non-empty literal makes the output total (never empty/None). Formula matches: some source always resolves truthy, so the guarantee holds for every source class in the api_base_resolution table.

    Cited code (1)

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.

4 obligations · 4 discharged

Browse the catalogue
Discharged

Happy-path behavior with valid inputs.

If it were violatedMedium

Precedence inverts so a stale litellm.api_base global or an OPENAI_API_BASE env value shadows the caller's explicit api_base argument, and the realtime request is dispatched to a base the caller did not choose while still carrying the caller's Bearer credential

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

Behavior when inputs are absent, nil, zero-length, or blank.

If it were violatedMedium

The fully-unset api_base chain fails to fall through to the https://api.openai.com default and yields an empty or partial base, so the endpoint builders emit a relative or malformed URL and the caller's Bearer realtime credential is dispatched to an unintended target instead of OpenAI

Discharging evidence1/1 required witnessed
  • nominalrequiredpresent
    Covered by 2 tests
Discharged

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.

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

Every reachable input combination is covered by a requirement.

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

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_base_resolved

Witnesses· 2 scenarios total

  • complete_url_custom_base
    exercises 1 condition scenario

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.

Covereda test exercises this rowExempteda reviewed mcdc:ignoreNo-actionfalse-result row satisfied by designUncoveredneeds a covering test
#api_base_resolvedResultProvesCovering test
1FFapi_base_resolvedExempted · defensive — the or-chain ends in the non-empty https://api.openai.com literal, so some source always resolves truthy; an unresolved base is unreachable in a correct build (reviewed: agent:claude-opus-4-8)
2TTapi_base_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.

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 Realtime: Python -> RustMIR-004
    DiffersPython → 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
2
Tests
0
At-risk contracts
0

Files to re-check (2)

  • transformation.rslitellm-rust/crates/core/src/providers/openai/realtime/transformation.rs
  • 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.

Sign in to discuss this with the proof team.Sign in