feat: implement phishing detection using OpenRouter API with configurable sampling rate

This commit is contained in:
Dries Augustyns
2026-04-21 21:28:31 +02:00
parent 60146fcc10
commit 2da8b065d0
5 changed files with 267 additions and 4 deletions
+4
View File
@@ -154,6 +154,10 @@ Required for builds and deployment (see turbo.json and .env.example):
plus-addressing, domain existence, and MX records
- Security (optional): `AUTO_PROJECT_DISABLE` (default: true) - Controls whether projects are automatically disabled when
bounce/complaint rate thresholds are exceeded
- Phishing Detection (optional):
- `OPENROUTER_API_KEY` - API key for OpenRouter (enables phishing detection)
- `OPENROUTER_MODEL` (default: anthropic/claude-3-haiku) - LLM model to use for content analysis
- `PHISHING_DETECTION_SAMPLE_RATE` (default: 0.1) - Percentage of emails to check (0.0-1.0, e.g., 0.1 = 10%)
**Important Notes:**