Troubleshooting¶
Common startup issues¶
OPENAI_API_KEY not set¶
Set it in .env or export it in your shell before running the backend.
PostgreSQL or Redis connection errors¶
Start the local infrastructure:
Port already in use¶
- backend:
8000 - PostgreSQL:
5432 - Redis:
6379 - Grafana:
3001
Import errors after pulling changes¶
Run:
Docs or runtime drift¶
Use the repo-quality checks:
Debug checklist¶
- Verify
.envvalues. - Confirm Redis and PostgreSQL are healthy.
- Check
uvicornstartup logs for dependency wiring failures. - Run
uv run pytestif you suspect a local code regression.