check_model_request
Function
This function is defined in the guard module.Raise :class:
ModelRequestBlocked if real model requests are blocked.
Call this immediately before handing a request to a provider. When requests
are allowed (the default) it is a single global read.
Signature
Parameters
Optional[str]
Model id the request names, used in the error message.
Optional[str]
Short label for the request path being guarded, e.g.
"litellm.completion" or "openai.chat.completions".Exceptions
ModelRequestBlocked
ModelRequestBlocked
If requests are currently blocked.
Uses
ModelRequestBlocked
Source
View on GitHub
praisonaiagents/model_harness/guard.py at line 196
