+ {g.description} +
+
+ {g.endpoint}
+
+ + No static headers configured. +
+ ) : ( ++ Submitted by {g.submittedBy} on {g.submittedAt} +
+{g.description}
+
+ {g.endpoint}
+
+
+
+ When enabled, the caller's LiteLLM API key is forwarded as an{" "}
+
+ Authorization
+ {" "}
+ header to your guardrail endpoint. This allows your guardrail to
+ authenticate model calls using the original caller's
+ credentials.
+
+ Sent with every request to the guardrail. +
+ {g.customHeaders.length === 0 ? ( ++ No static headers configured. +
+ ) : ( ++ Allowed header names to forward from the client request to the guardrail (e.g. x-request-id). +
+ {g.extraHeaders.length === 0 ? ( ++ No forward client headers configured. +
+ ) : ( +
+ {buildEquivalentConfigYaml(g)}
+
+ )}
+ + This guardrail runs on a separate instance. It receives the user + request and forwards the result to the next step in the pipeline. See{" "} + + LiteLLM Generic Guardrail API docs + {" "} + for configuration details. +
++ Are you sure you want to {action}{" "} + "{guardrailName}"?{" "} + {isApprove + ? "This will make it active and available for use." + : "This will mark it as rejected and notify the team."} +
++ Reset spend for {currentKeyData?.key_alias || currentKeyData?.token_id || "this key"} to{" "} + $0? +
++ Current spend: ${formatNumberWithCommas(currentKeyData.spend, 4)}. Spend history is + preserved in logs. This resets the current period spend counter, the same as an automatic budget reset. +
+
+ {JSON.stringify(value, null, 2)}
+
+ N/A
+Token: {value.token ?? "N/A"}
+ )} + {value.spend !== undefined && ( +Spend: ${Number(value.spend).toFixed(6)}
+ )} + {value.max_budget !== undefined && ( +Max Budget: ${Number(value.max_budget).toFixed(6)}
+ )} ++ Details +
+- To enable audit logging, add the following configuration to your LiteLLM proxy configuration file: -
-
- {`litellm_settings:
- store_audit_logs: true`}
-
- - Note: This will only affect new requests after the configuration change and proxy restart. -
-- Token: {value.token || "N/A"} -
- )} - {changedKeys.includes("spend") && ( -- Spend:{" "} - {value.spend !== undefined ? `$${formatNumberWithCommas(value.spend, 6)}` : "N/A"} -
- )} - {changedKeys.includes("max_budget") && ( -- Max Budget:{" "} - {value.max_budget !== undefined ? `$${formatNumberWithCommas(value.max_budget, 6)}` : "N/A"} -
- )} -
- {JSON.stringify(value, null, 2)}
-
- );
- }
- }
-
- return (
-
- {JSON.stringify(value, null, 2)}
-
- );
- };
-
- let displayBeforeValue = before_value;
- let displayUpdatedValue = updated_values;
-
- if ((action === "updated" || action === "rotated") && before_value && updated_values) {
- if (
- table_name === "LiteLLM_TeamTable" ||
- table_name === "LiteLLM_UserTable" ||
- table_name === "LiteLLM_VerificationToken"
- ) {
- const changedBefore: RecordThis is a LiteLLM Enterprise feature, and requires a valid key to use. -
Here's a preview of what Audit Logs offer: -