Proof Portal
litellm
BerriAI117 findings · 107 requirementsLiteLLM Python->Rust migration audit (proof mirroring).
93 withheld (location undisclosed)
_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
Specification
The requirement exactly as authored — its complete prose text and, where present, the formal FRETish sentence it compiles to.
_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
the openai_responses shall always satisfy (gpt5_classified <-> (no_foreign_provider_prefix & gpt5_substring_present & not_gpt5_chat))
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
- 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.
- 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 catalogueHappy-path behavior with valid inputs.
- nominalrequiredpresentCovered by 1 test
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.
- nominalrequiredpresentCovered by 1 test
Every reachable input combination is covered by a requirement.
- nominalrequiredpresentCovered 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_outputObligation: 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).
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_classesexercises 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.
mcdc:ignoreNo-actionfalse-result row satisfied by designUncoveredneeds a covering test| # | gpt5_classified | gpt5_substring_present | no_foreign_provider_prefix | not_gpt5_chat | Result | Proves | Covering test |
|---|---|---|---|---|---|---|---|
| 1 | F | F | F | F | T | gpt5_classified | |
| 2 | T | F | F | F | F | gpt5_classified | Exempted · 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) |
| 3 | T | F | T | T | F | gpt5_substring_present | Exempted · 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) |
| 4 | T | T | F | T | F | no_foreign_provider_prefix | Exempted · 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) |
| 5 | T | T | T | F | F | not_gpt5_chat | Exempted · 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) |
| 6 | T | T | T | T | T | gpt5_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.
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
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.