LMArena Bridge is designed for long-running production deployments. This page covers the built-in error handling pipeline, how to enable debug logging, which metrics to monitor, and the security steps you should take before exposing the bridge on a network.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cloudwaddie/lmarenabridge/llms.txt
Use this file to discover all available pages before exploring further.
Error handling
LMArena Bridge includes comprehensive error handling for production use:| Category | What it covers |
|---|---|
| Request validation | JSON format, required fields, and data types |
| Model validation | Model availability and access permissions |
| Image processing | Image formats, sizes (max 10 MB), and MIME types |
| Upload failures | Graceful handling of image upload failures with retry logic |
| Timeout handling | Configurable timeouts for all HTTP requests (30–120 s) |
| Rate limiting | Built-in rate limiting per API key |
| Error responses | OpenAI-compatible error format for easy client integration |
Debug mode
Debug mode is off by default in production. To enable it, setDEBUG = True in src/constants.py:
src/constants.py
- Detailed request/response logs
- Image upload progress
- Model capability checks
- Session management details
Monitoring
Track these key metrics in production:- API response times — slow responses indicate timeout issues
- Error rates — track 4xx/5xx errors from
POST /api/v1/chat/completions - Model usage — the dashboard shows the top 10 most-used models
- Image upload success — monitor image upload failures in logs
Security best practices
- API keys — use strong, randomly generated keys; the dashboard auto-generates secure keys
- Rate limiting — configure appropriate requests-per-minute (RPM) per API key in the dashboard
- Admin password — change the default
adminpassword inconfig.jsonor through the dashboard - HTTPS — place a reverse proxy (nginx, Caddy) with SSL in front of the bridge; see Configure a reverse proxy
- Firewall — restrict external access to port
8000
Default values
| Setting | Value | Source |
|---|---|---|
| Server port | 8000 | PORT in src/constants.py |
| Request timeout | 120 seconds | DEFAULT_REQUEST_TIMEOUT in src/constants.py |
| Default RPM | 60 requests per minute | DEFAULT_RATE_LIMIT_RPM in src/constants.py |