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

_is_gpt_5_model classifies a model as an actual OpenAI gpt-5 model if and only if it carries no non-openai provider prefix before the first slash AND contains the gpt-5 token AND is not a gpt-5-chat model; pass-through models from other providers that merely reference gpt-5 are excluded

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

_is_gpt_5_model classifies a model as an actual OpenAI gpt-5 model if and only if it carries no non-openai provider prefix before the first slash AND contains the gpt-5 token AND is not a gpt-5-chat model; pass-through models from other providers that merely reference gpt-5 are excluded

FRETish formula
the openai_responses shall always satisfy (gpt5_classified <-> (no_foreign_provider_prefix & gpt5_substring_present & not_gpt5_chat))
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
  • scenarioreviewednominal

    nominal is the classification happy path over the finite model-name classes (bare gpt-5, openai-prefixed, gpt-5-chat, foreign-prefixed, non-gpt-5) enumerated in the gpt5_model_classification table; a model id is always a string, so there is no malformed or empty partition distinct from the non_gpt5 class

  • propertyreviewedpure_function_property_testedtotality

    _is_gpt_5_model is a pure string predicate (output=f(model), no I/O), so the biconditional and its provider-prefix/substring/chat-exclusion conditions are property-testable and total over any model string; determinism and idempotency are trivially implied by purity and are not restated

  • structuralnot applicable

    Garbage-collected Python string split/membership test with no manual memory, pointer arithmetic, overflow, or format string

  • domainnot applicable

    Pure in-process string classification issuing no network/filesystem/IPC 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-14

    _is_gpt_5_model: line 49 'if len(parts) > 1 and parts[0] not in ("openai",): return False' gates the foreign-provider-prefix exclusion; line 51 'return "gpt-5" in model and "gpt-5-chat" not in model' is the substring-present AND not-chat conjunction. FRETish gpt5_classified <-> (no_foreign_provider_prefix & gpt5_substring_present & not_gpt5_chat) matches all three code conditions exactly.

    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.

3 obligations · 3 discharged

Browse the catalogue
Discharged

Happy-path behavior with valid inputs.

Discharging evidence1/1 required witnessed
  • nominalrequiredpresent
    Covered by 1 test
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

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 (gpt5_classified <-> (no_foreign_provider_prefix & gpt5_substring_present & not_gpt5_chat))

Witnesses· 2 scenarios total

  • test_classification_over_model_name_classes
    exercises 2 condition scenarios

MC/DC truth table· 6 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
#gpt5_classifiedgpt5_substring_presentno_foreign_provider_prefixnot_gpt5_chatResultProvesCovering test
1FFFFTgpt5_classified
2TFFFFgpt5_classifiedExempted · defensive — classification is True only when all three conditions hold, so a True output with every condition false is unreachable in a correct build (reviewed: agent:claude-opus-4-8)
3TFTTFgpt5_substring_presentExempted · defensive — absence of the gpt-5 token forces False, so a gpt-5 classification without the token is unreachable in a correct build (reviewed: agent:claude-opus-4-8)
4TTFTFno_foreign_provider_prefixExempted · defensive — a foreign provider prefix forces the classifier to return False, so a gpt-5 classification with a foreign prefix is unreachable in a correct build (reviewed: agent:claude-opus-4-8)
5TTTFFnot_gpt5_chatExempted · defensive — a gpt-5-chat model is explicitly excluded, so a gpt-5 classification of a chat model is unreachable in a correct build (reviewed: agent:claude-opus-4-8)
6TTTTTgpt5_substring_present

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