docs(guardrails): add during_call mode to Model Armor guardrail docs#26394
docs(guardrails): add during_call mode to Model Armor guardrail docs#26394wadhah101 wants to merge 1 commit intoBerriAI:litellm_oss_branchfrom
Conversation
|
|
Low: Documentation-only changeThis PR updates documentation to add Status: 0 open Posted by Veria AI · 2026-04-24T06:46:24.029Z |
Greptile SummaryThis docs-only PR adds the missing Confidence Score: 5/5Safe to merge — documentation-only change with accurate, verified content. Single docs file changed; both the addition of No files require special attention.
|
| Filename | Overview |
|---|---|
| docs/my-website/docs/proxy/guardrails/model_armor.md | Adds during_call mode to example config, mode descriptions, and parameter docs; fixes post_call description from "input & output" to "output" — all verified accurate against model_armor.py source. |
Sequence Diagram
sequenceDiagram
participant Client
participant LiteLLM
participant ModelArmor
participant LLM
Note over LiteLLM,ModelArmor: pre_call mode
Client->>LiteLLM: Request
LiteLLM->>ModelArmor: Sanitize input
ModelArmor-->>LiteLLM: OK / Block
LiteLLM->>LLM: Forward (if OK)
Note over LiteLLM,LLM: during_call mode
Client->>LiteLLM: Request
LiteLLM->>ModelArmor: Sanitize input (parallel)
LiteLLM->>LLM: Forward (parallel)
ModelArmor-->>LiteLLM: OK / Block
LLM-->>LiteLLM: Response
Note over LiteLLM,ModelArmor: post_call mode
Client->>LiteLLM: Request
LiteLLM->>LLM: Forward
LLM-->>LiteLLM: Response
LiteLLM->>ModelArmor: Sanitize output
ModelArmor-->>LiteLLM: OK / Block
LiteLLM-->>Client: Response (if OK)
Reviews (2): Last reviewed commit: "docs: add during_call mode to Model Armo..." | Re-trigger Greptile
The Model Armor guardrail supports during_call mode (runs in parallel with the LLM call) but the documentation only listed pre_call and post_call. This updates the docs to reflect all three supported modes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9bb57d8 to
b79b64b
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Congrats! CodSpeed is installed 🎉
You will start to see performance impacts in the reports once the benchmarks are run from your default branch.
|
Summary
The current Model Armor documentation is outdated — it only lists
pre_callandpost_callmodes, butduring_callsupport was added in #15970.This PR updates the docs to reflect all three supported modes.
Changes
during_callmode to the YAML example, supported values section, and common paramspost_calldescription from "input & output" to "output" (it only checks the model response)Code References
model_armor.pyL65-69during_callhandler (async_moderation_hook):model_armor.pyL469-562Test plan
🤖 Generated with Claude Code