# Disable validators globally
export ENABLE_VALIDATORS=false
# Restart backend
# (method depends on your deployment)Set these environment variables to disable validators:
ENABLE_VALIDATORS=false
ENABLE_TONE_ALIGN=false # Optional: also disable tone alignmentLocal:
# Stop current process (Ctrl+C)
# Restart
python start_backend.py
# or
uvicorn backend.api.main:app --reloadDocker:
docker-compose restart backendRailway/Render:
- Update environment variables in dashboard
- Redeploy or restart service
Check API:
# Should work without validation
curl -X POST http://localhost:8000/api/chat/rag \
-H "Content-Type: application/json" \
-d '{"message": "Test"}'Check Logs:
- No validation-related logs should appear
- No "Validation failed" messages
You can't disable individual validators via env vars yet, but you can modify backend/api/main.py:
# Comment out specific validators
chain = ValidatorChain([
CitationRequired(),
# EvidenceOverlap(threshold=0.08), # Disabled
NumericUnitsBasic(),
# EthicsAdapter(guard_callable=None), # Disabled
])# In backend/api/main.py, comment out validation block:
# if enable_validators:
# ... validation code ...-
ENABLE_VALIDATORS=falseset - Backend restarted
- API calls work without validation errors
- No validation metrics being recorded
- Dashboard "Validation" page shows "No validation data"
- Logs show no validation-related errors
Solution:
- Check environment variables are actually set:
echo $ENABLE_VALIDATORS
- Clear Python cache:
find . -type d -name __pycache__ -exec rm -r {} + - Restart backend completely (not just reload)
Solution:
- Check if
ENABLE_VALIDATORSis actuallyfalse(notFalseorFALSE) - Verify backend process has restarted
- Check logs for validation code execution
Solution:
- Metrics are in-memory, will clear on restart
- Or call
GET /api/validators/metricsto verify it returns empty data
If environment variables don't work, you can revert code changes:
# Revert main.py changes
git checkout HEAD -- backend/api/main.py
# Remove validator modules (optional, not required)
# They won't be used if ENABLE_VALIDATORS=falseTo avoid needing rollback:
- Test locally first with
ENABLE_VALIDATORS=true - Monitor metrics in dashboard before enabling in production
- Start with low thresholds (e.g.,
VALIDATOR_EVIDENCE_THRESHOLD=0.01) - Gradually increase thresholds as confidence builds
If rollback doesn't work:
- Check logs:
backend/api/main.pyline 172-246 - Verify imports are not failing
- Check Python version compatibility (3.12+)
- Open issue with logs and environment details