diff --git a/litellm/proxy/_lazy_openapi_snapshot.json b/litellm/proxy/_lazy_openapi_snapshot.json index 0930febc449..1044c7da538 100644 --- a/litellm/proxy/_lazy_openapi_snapshot.json +++ b/litellm/proxy/_lazy_openapi_snapshot.json @@ -8964,6 +8964,18 @@ "description": "When True, unified guardrails only evaluate tool results, the untrusted data an agent feeds back into the model, and skip system, user, and assistant content. Intended for agent harnesses whose own prompt scaffolding is trusted but often trips prompt-attack detectors.", "title": "Scan Only Tool Results" }, + "scan_raw_request": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "When True, this pre_call guardrail always evaluates the request as it was before any guardrail in this hook ran, regardless of its position in the guardrails list -- so the YAML order of guardrails can never change whether this one blocks. Use only for block-only guardrails: any data this guardrail returns is discarded, same contract as run_in_parallel, since an earlier guardrail's masking must not be undone by this one.", + "title": "Scan Raw Request" + }, "sensitive_data_route_to_model": { "anyOf": [ { @@ -10014,6 +10026,18 @@ "description": "Additional provider-specific parameters for generic guardrail APIs", "title": "Additional Provider Specific Params" }, + "advisory_system_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Custom advisory message template used when on_flagged='inject_system_message'. Must contain a {reason} placeholder. Defaults to a generic advisory message if unset.", + "title": "Advisory System Message" + }, "akto_account_id": { "anyOf": [ { @@ -11068,7 +11092,8 @@ { "enum": [ "block", - "monitor" + "monitor", + "inject_system_message" ], "type": "string" }, @@ -11077,7 +11102,7 @@ } ], "default": "block", - "description": "Action to take when content is flagged: 'block' (raise exception) or 'monitor' (log only)", + "description": "Action to take when content is flagged: 'block' (raise exception), 'monitor' (log only), or 'inject_system_message' (append an advisory system message and let the LLM decide)", "title": "On Flagged" }, "on_flagged_action": { @@ -11575,6 +11600,18 @@ "description": "When True, unified guardrails only evaluate tool results, the untrusted data an agent feeds back into the model, and skip system, user, and assistant content. Intended for agent harnesses whose own prompt scaffolding is trusted but often trips prompt-attack detectors.", "title": "Scan Only Tool Results" }, + "scan_raw_request": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "When True, this pre_call guardrail always evaluates the request as it was before any guardrail in this hook ran, regardless of its position in the guardrails list -- so the YAML order of guardrails can never change whether this one blocks. Use only for block-only guardrails: any data this guardrail returns is discarded, same contract as run_in_parallel, since an earlier guardrail's masking must not be undone by this one.", + "title": "Scan Raw Request" + }, "send_user_api_key_alias": { "anyOf": [ { diff --git a/ui/litellm-dashboard/src/lib/http/schema.d.ts b/ui/litellm-dashboard/src/lib/http/schema.d.ts index 9df7d8baba7..a9607ee35d4 100644 --- a/ui/litellm-dashboard/src/lib/http/schema.d.ts +++ b/ui/litellm-dashboard/src/lib/http/schema.d.ts @@ -23067,6 +23067,11 @@ export interface components { * @description When True, unified guardrails only evaluate tool results, the untrusted data an agent feeds back into the model, and skip system, user, and assistant content. Intended for agent harnesses whose own prompt scaffolding is trusted but often trips prompt-attack detectors. */ scan_only_tool_results?: boolean | null; + /** + * Scan Raw Request + * @description When True, this pre_call guardrail always evaluates the request as it was before any guardrail in this hook ran, regardless of its position in the guardrails list -- so the YAML order of guardrails can never change whether this one blocks. Use only for block-only guardrails: any data this guardrail returns is discarded, same contract as run_in_parallel, since an earlier guardrail's masking must not be undone by this one. + */ + scan_raw_request?: boolean | null; /** * Sensitive Data Route To Model * @description Model to route requests to when sensitive data is detected and on_sensitive_data='route'. This is typically an on-premise model for data privacy. The routing decision persists for the entire session. @@ -29378,6 +29383,11 @@ export interface components { additional_provider_specific_params?: { [key: string]: unknown; } | null; + /** + * Advisory System Message + * @description Custom advisory message template used when on_flagged='inject_system_message'. Must contain a {reason} placeholder. Defaults to a generic advisory message if unset. + */ + advisory_system_message?: string | null; /** * Akto Account Id * @description Akto account ID for multi-tenant deployments. Env: AKTO_ACCOUNT_ID. Default: '1000000'. @@ -29825,10 +29835,10 @@ export interface components { on_disallowed_action: "block" | "rewrite"; /** * On Flagged - * @description Action to take when content is flagged: 'block' (raise exception) or 'monitor' (log only) + * @description Action to take when content is flagged: 'block' (raise exception), 'monitor' (log only), or 'inject_system_message' (append an advisory system message and let the LLM decide) * @default block */ - on_flagged: ("block" | "monitor") | null; + on_flagged: ("block" | "monitor" | "inject_system_message") | null; /** * On Flagged Action * @description Action to take when content is flagged: 'block' (raise exception) or 'monitor' (log only) @@ -30017,6 +30027,11 @@ export interface components { * @description When True, unified guardrails only evaluate tool results, the untrusted data an agent feeds back into the model, and skip system, user, and assistant content. Intended for agent harnesses whose own prompt scaffolding is trusted but often trips prompt-attack detectors. */ scan_only_tool_results?: boolean | null; + /** + * Scan Raw Request + * @description When True, this pre_call guardrail always evaluates the request as it was before any guardrail in this hook ran, regardless of its position in the guardrails list -- so the YAML order of guardrails can never change whether this one blocks. Use only for block-only guardrails: any data this guardrail returns is discarded, same contract as run_in_parallel, since an earlier guardrail's masking must not be undone by this one. + */ + scan_raw_request?: boolean | null; /** * Send User Api Key Alias * @description Whether to send user_API_key_alias in headers @@ -55060,8 +55075,6 @@ export interface operations { page_size?: number; /** @description Filter logs by status (e.g., success, failure) */ status_filter?: string | null; - /** @description Filter logs by cache state: 'hit' or 'miss'. Miss includes legacy rows with a null/unknown cache state */ - cache_hit_filter?: string | null; /** @description Filter logs by model */ model?: string | null; /** @description Filter logs by model ID (litellm model deployment id) */ @@ -55172,8 +55185,6 @@ export interface operations { page_size?: number; /** @description Filter logs by status (e.g., success, failure) */ status_filter?: string | null; - /** @description Filter logs by cache state: 'hit' or 'miss'. Miss includes legacy rows with a null/unknown cache state */ - cache_hit_filter?: string | null; /** @description Filter logs by model */ model?: string | null; /** @description Filter logs by model ID (litellm model deployment id) */