+
+
+
+
+
+
+
+
+ {config.lakera_enabled && (
+
+
Security Options
+
+ {/* Blocking Mode Toggle */}
+
+
+
+
+
+ Block flagged content instead of just logging
+
+
+
+
+ {/* RAG Content Scanning Toggle */}
+
+
+
+
+
+ Scan document chunks during ingestion
+
+
+
+
+
+ )}
+
+ {config.rag_content_scanning && (
+
+
+
handleConfigUpdate({ rag_lakera_project_id: e.target.value })}
+ placeholder="project-8541012967"
+ className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
+ />
+
+ Separate project ID for RAG content scanning to keep it isolated from chat interface scanning.
+
+
+ )}
+
+
+
+ {config.lakera_enabled && (
+
+ {config.lakera_blocking_mode
+ ? "đĢ Blocking mode enabled - flagged content will be blocked"
+ : "đ Logging mode - flagged content will be logged but allowed"}
+
+ )}
+
+
+
+
+
+
+
+ Route LLM calls through LiteLLM instead of direct OpenAI
+
+
+
+ {(config.use_litellm ?? false) && (
+
+
+ handleConfigUpdate({ litellm_base_url: e.target.value })}
+ placeholder="http://localhost:4000"
+ className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
+ />
+
+ )}
+ {!(config.use_litellm ?? false) && (
+
+
+
+ handleConfigUpdate({ openai_api_key: e.target.value })}
+ placeholder="sk-..."
+ className="w-full px-3 py-2 pr-10 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
+ />
+
+
+
+ )}
+ {(config.use_litellm ?? false) && (
+
+
+
+ Optional for some proxies; used as the Bearer token when set.
+
+
+ handleConfigUpdate({ litellm_virtual_key: e.target.value })}
+ placeholder="sk-... (master or virtual) or leave empty"
+ className="w-full px-3 py-2 pr-10 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
+ />
+
+
+
+ )}
+ {(config.use_litellm ?? false) && config.lakera_enabled && (
+
+
+ In LiteLLM mode, the app selects a guardrail name based on Lakera blocking mode.
+ These names should match entries in litellm/config.yaml.
+
+
+
+ handleConfigUpdate({ litellm_guardrail_name: e.target.value })}
+ placeholder="lakera-guard-block"
+ className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
+ />
+
+
+
+
+ handleConfigUpdate({ litellm_guardrail_monitor_name: e.target.value })
+ }
+ placeholder="lakera-guard-monitor"
+ className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
+ />
+
+
+ )}
+
+
+
+ handleConfigUpdate({ lakera_api_key: e.target.value })}
+ placeholder="lk-..."
+ className="w-full px-3 py-2 pr-10 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
+ />
+
+
+
+
+
+
handleConfigUpdate({ lakera_project_id: e.target.value })}
+ placeholder="project-8541012967"
+ className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
+ />
+
+ Optional: Include a project ID for Lakera Guard requests
+
+
+