mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
fix: add 'block' to on_violation Literal type in BaseLitellmParams
Fixes BerriAI/litellm#23624. The on_violation field only allowed 'warn' and 'end_session', but 'block' is a valid value used in guardrail configs. This caused a pydantic validation error when loading guardrails from the database.
This commit is contained in:
parent
25ee2fb3f9
commit
6adb6a632d
1 changed files with 1 additions and 1 deletions
|
|
@ -656,7 +656,7 @@ class BaseLitellmParams(
|
|||
default=None,
|
||||
description="For /v1/realtime sessions: automatically close the session after this many guardrail violations.",
|
||||
)
|
||||
on_violation: Optional[Literal["warn", "end_session"]] = Field(
|
||||
on_violation: Optional[Literal["warn", "end_session", "block"]] = Field(
|
||||
default=None,
|
||||
description="For /v1/realtime sessions: 'warn' speaks the violation message and continues; 'end_session' speaks the message and closes the connection.",
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue