Skip to main content

AI Janitor Configuration

Fine-tune the AI Janitor to match your team's workflow and compliance requirements.

Scan Settings

SettingDefaultOptionsDescription
Scan Scheduleweeklymanual, daily, weekly, monthlyHow often automatic scans run
Stale Threshold90 days30365Days a flag must be at 100% true/0% false before it's considered stale
Auto-generate PRfalsetrue/falseAutomatically create cleanup PRs without manual approval

LLM Provider Settings

SettingDefaultDescription
ProviderdeepseekWhich LLM to use for code analysis
Modeldeepseek-chatModel name within the provider
Temperature0.10Lower = more deterministic output
Min Confidence0.85Below this threshold, flag PRs for manual review

Supported Providers

ProviderModelBest For
DeepSeekdeepseek-chatCost-effective, 128K context, fast
OpenAIgpt-4o-miniHigh accuracy, broader language support
Azure OpenAIgpt-4oEnterprise compliance, data residency
Self-hostedConfigurableAir-gapped environments, custom models

Compliance Settings

SettingDefaultDescription
Compliance ModeapprovedHow LLM processing is governed
Data MaskingfalseRedact sensitive patterns before LLM analysis
Audit LogtrueRecord all LLM interactions for compliance
Monthly Budget$0 (unlimited)Max spend on LLM analysis per month

Compliance Modes

ModeDescriptionUse Case
approvedOnly use approved providersStandard enterprise
strictApproved + data masking + auditRegulated industries
byoSelf-hosted LLM onlyAir-gapped environments
disabledNo LLM analysis, regex onlyZero external data sharing

Branch Settings

SettingDefaultDescription
Branch Prefixjanitor/Prefix for generated branch names (e.g., janitor/remove-feature-x)

Notification Settings

SettingDefaultDescription
NotificationstrueSend alerts for new stale flags and PR status

Environment Variables

For self-hosted deployments, configure via environment variables:

# LLM Provider (global default)
JANITOR_LLM_PROVIDER=deepseek

# DeepSeek
DEEPSEEK_API_KEY=sk-...
DEEPSEEK_MODEL=deepseek-chat
DEEPSEEK_BASE_URL=https://api.deepseek.com/v1

# OpenAI
OPENAI_API_KEY=sk-...
OPENAI_MODEL=gpt-4o-mini

# Azure OpenAI
AZURE_OPENAI_API_KEY=...
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
AZURE_OPENAI_MODEL=gpt-4o

# Global LLM settings
JANITOR_LLM_TIMEOUT=30s
JANITOR_LLM_MAX_RETRIES=3
JANITOR_LLM_MIN_CONFIDENCE=0.85