Proof Portal
litellm
BerriAI117 findings · 107 requirementsLiteLLM Python->Rust migration audit (proof mirroring).
93 withheld (location undisclosed)
validate_anthropic_messages_environment builds Azure authentication headers for the /v1/messages endpoint via BaseAzureLLM._base_validate_azure_environment (resolving an Azure api-key or Entra Bearer from litellm_params, into which the api_key parameter is injected), then converts a resolved api-key header to x-api-key iff an api-key header is present and no x-api-key header is already present, sets anthropic-version to 2023-06-01 and content-type to application/json when each is absent, applies anthropic-beta headers, and never logs the credential
Specification
The requirement exactly as authored — its complete prose text and, where present, the formal FRETish sentence it compiles to.
validate_anthropic_messages_environment builds Azure authentication headers for the /v1/messages endpoint via BaseAzureLLM._base_validate_azure_environment (resolving an Azure api-key or Entra Bearer from litellm_params, into which the api_key parameter is injected), then converts a resolved api-key header to x-api-key iff an api-key header is present and no x-api-key header is already present, sets anthropic-version to 2023-06-01 and content-type to application/json when each is absent, applies anthropic-beta headers, and never logs the credential
the azure_messages shall always satisfy (x_api_key_set <-> (api_key_header_present & !x_api_key_present))
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
- Aug 2, 2026, 00:45 UTC · Claude Opus 4 8 · AI agent
- Modified
- Aug 2, 2026, 00:45 UTC · Claude Opus 4 8 · AI agent
Change history
Every recorded revision of this requirement's source file — newest first, each with its commit message and the diff for that change.
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.
- nominalrequiredpresentCovered by 2 tests
Authorization headers, session IDs, secrets, and PII never appear in logs.
If the Azure api-key/x-api-key value or the Entra Bearer Authorization header is written to debug/verbose logs, anyone with access to log aggregation, support bundles, or a shared console exfiltrates a live Azure Foundry credential and can bill usage to the customer and read every prompt they submit
- nominalrequiredpresentNo covering test recorded
- negativerecommendedpresentNo 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 azure_messages shall always satisfy (x_api_key_set <-> (api_key_header_present & !x_api_key_present))
MC/DC truth table· 5 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_header_present | x_api_key_present | x_api_key_set | Result | Proves | Covering test |
|---|---|---|---|---|---|---|
| 1 | F | F | F | T | api_key_header_present | — |
| 2 | F | F | T | F | x_api_key_set | Exempted · defensive — x_api_key_set records the api-key->x-api-key move; with no api-key header present the move never happens, so a set=T outcome is unreachable in a correct build (reviewed: agent:claude-opus-4-8) |
| 3 | T | F | F | F | api_key_header_present | Exempted · defensive — when an api-key header is present and no x-api-key exists the conversion always fires, so a present-key-yet-unset state is unreachable in a correct build (reviewed: agent:claude-opus-4-8) |
| 4 | T | F | T | T | x_api_key_present | — |
| 5 | T | T | T | F | x_api_key_present | Exempted · defensive — an existing x-api-key is never overwritten by the api-key conversion, so a set=T outcome when x-api-key is already present is unreachable in a correct build (this test pins the reachable no-overwrite behavior) (reviewed: agent:claude-opus-4-8) |
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.
- Azure AI messages: Python -> RustMIR-008DiffersPython → 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 (2)
- messages_transformation.pylitellm/llms/azure_ai/anthropic/messages_transformation.py
- transformation.rslitellm-rust/crates/core/src/providers/azure_ai/messages/transformation.rs
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.