+
+
+
+ {g.endpoint}
+
+
+
+
+
+
+
+
+ {g.method}
+
+
+
+
+
+
+
+ Forward LiteLLM API Key
+
+
+
+
+
+ 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.
+
+
+
+
+
+ Static headers
+
+ {g.customHeaders.length > 0 && (
+
+ {g.customHeaders.length}
+
+ )}
+
+
+ Sent with every request to the guardrail.
+
+ {g.customHeaders.length === 0 ? (
+
+ No static headers configured.
+
+ ) : (
+
+ {g.customHeaders.map((h, i) => (
+
+
+ {h.key}: {h.value}
+
+
+ onUpdateCustomHeaders(
+ g.customHeaders.filter((_, idx) => idx !== i)
+ )
+ }
+ className="text-gray-400 hover:text-red-600 flex-shrink-0"
+ aria-label={`Remove ${h.key}`}
+ >
+
+
+
+ ))}
+
+ )}
+
+ setNewStaticHeaderKey(e.target.value)}
+ placeholder="Header name (e.g. X-API-Key)"
+ className="flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500"
+ onKeyDown={(e) => {
+ if (e.key === "Enter") {
+ e.preventDefault();
+ const key = newStaticHeaderKey.trim();
+ const value = newStaticHeaderValue.trim();
+ if (key && !g.customHeaders.some((h) => h.key.toLowerCase() === key.toLowerCase())) {
+ onUpdateCustomHeaders([...g.customHeaders, { key, value }]);
+ setNewStaticHeaderKey("");
+ setNewStaticHeaderValue("");
+ }
+ }
+ }}
+ />
+ setNewStaticHeaderValue(e.target.value)}
+ placeholder="Value"
+ className="flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500"
+ onKeyDown={(e) => {
+ if (e.key === "Enter") {
+ e.preventDefault();
+ const key = newStaticHeaderKey.trim();
+ const value = newStaticHeaderValue.trim();
+ if (key && !g.customHeaders.some((h) => h.key.toLowerCase() === key.toLowerCase())) {
+ onUpdateCustomHeaders([...g.customHeaders, { key, value }]);
+ setNewStaticHeaderKey("");
+ setNewStaticHeaderValue("");
+ }
+ }
+ }}
+ />
+ {
+ const key = newStaticHeaderKey.trim();
+ const value = newStaticHeaderValue.trim();
+ if (key && !g.customHeaders.some((h) => h.key.toLowerCase() === key.toLowerCase())) {
+ onUpdateCustomHeaders([...g.customHeaders, { key, value }]);
+ setNewStaticHeaderKey("");
+ setNewStaticHeaderValue("");
+ }
+ }}
+ className="text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors flex-shrink-0"
+ >
+ Add
+
+
+
+
+
+
+ Forward client headers
+
+ {g.extraHeaders.length > 0 && (
+
+ {g.extraHeaders.length}
+
+ )}
+
+
+ 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.
+
+ ) : (
+
+ {g.extraHeaders.map((name, i) => (
+
+ {name}
+
+ onUpdateExtraHeaders(
+ g.extraHeaders.filter((_, idx) => idx !== i)
+ )
+ }
+ className="text-gray-400 hover:text-red-600 flex-shrink-0"
+ aria-label={`Remove ${name}`}
+ >
+
+
+
+ ))}
+
+ )}
+
+ setNewExtraHeader(e.target.value)}
+ placeholder="e.g. x-request-id"
+ className="flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500"
+ onKeyDown={(e) => {
+ if (e.key === "Enter") {
+ e.preventDefault();
+ const name = newExtraHeader.trim().toLowerCase();
+ if (name && !g.extraHeaders.map((h) => h.toLowerCase()).includes(name)) {
+ onUpdateExtraHeaders([...g.extraHeaders, name]);
+ setNewExtraHeader("");
+ }
+ }
+ }}
+ />
+ {
+ const name = newExtraHeader.trim().toLowerCase();
+ if (name && !g.extraHeaders.map((h) => h.toLowerCase()).includes(name)) {
+ onUpdateExtraHeaders([...g.extraHeaders, name]);
+ setNewExtraHeader("");
+ }
+ }}
+ className="text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors"
+ >
+ Add
+
+
+
+
+
setConfigExpanded(!configExpanded)}
+ className="w-full flex items-center justify-between px-3 py-2 text-left text-xs font-semibold text-gray-700 bg-gray-50 hover:bg-gray-100 transition-colors"
+ >
+ Equivalent config
+ {configExpanded ? (
+
+ ) : (
+
+ )}
+
+ {configExpanded && (
+
+ {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.
+
+
+