Skip to content

docs(guardrails): add during_call mode to Model Armor guardrail docs#26394

Open
wadhah101 wants to merge 1 commit intoBerriAI:litellm_oss_branchfrom
wadhah101:docs/model-armor-during-call
Open

docs(guardrails): add during_call mode to Model Armor guardrail docs#26394
wadhah101 wants to merge 1 commit intoBerriAI:litellm_oss_branchfrom
wadhah101:docs/model-armor-during-call

Conversation

@wadhah101
Copy link
Copy Markdown

@wadhah101 wadhah101 commented Apr 24, 2026

Summary

The current Model Armor documentation is outdated — it only lists pre_call and post_call modes, but during_call support was added in #15970.

This PR updates the docs to reflect all three supported modes.

Changes

  • Added during_call mode to the YAML example, supported values section, and common params
  • Fixed post_call description from "input & output" to "output" (it only checks the model response)

Code References

Test plan

  • Verify docs render correctly on the docs site

🤖 Generated with Claude Code

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@veria-ai
Copy link
Copy Markdown

veria-ai Bot commented Apr 24, 2026

Low: Documentation-only change

This PR updates documentation to add during_call mode to the Model Armor guardrail docs. No code changes, no security impact.


Status: 0 open
Risk: 1/10

Posted by Veria AI · 2026-04-24T06:46:24.029Z

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 24, 2026

Greptile Summary

This docs-only PR adds the missing during_call mode to the Model Armor guardrail documentation and corrects the post_call description. Both changes are verified accurate against the implementation in model_armor.py (L65-69 for supported hooks, L469-562 for async_moderation_hook).

Confidence Score: 5/5

Safe to merge — documentation-only change with accurate, verified content.

Single docs file changed; both the addition of during_call and the correction of the post_call description are confirmed correct by reading the source code. No logic, security, or behavioral changes.

No files require special attention.

Important Files Changed

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)
Loading

Reviews (2): Last reviewed commit: "docs: add during_call mode to Model Armo..." | Re-trigger Greptile

@wadhah101 wadhah101 changed the base branch from main to litellm_oss_branch April 24, 2026 06:44
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>
@wadhah101 wadhah101 force-pushed the docs/model-armor-during-call branch from 9bb57d8 to b79b64b Compare April 24, 2026 06:45
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@wadhah101 wadhah101 changed the title docs: add during_call mode to Model Armor guardrail docs docs(guardrails): add during_call mode to Model Armor guardrail docs Apr 24, 2026
@codspeed-hq
Copy link
Copy Markdown
Contributor

codspeed-hq Bot commented Apr 24, 2026

Congrats! CodSpeed is installed 🎉

🆕 16 new benchmarks were detected.

You will start to see performance impacts in the reports once the benchmarks are run from your default branch.

Detected benchmarks


Open in CodSpeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants