@@ -92,23 +92,35 @@ cp .env.example .env
9292
9393### Key Configuration Options
9494
95- | Setting | Environment Variable | Default | Description |
96- | ----------------------- | ---------------------------------- | ------------------------ | ------------------------------------------------------------------------------------------- |
97- | Server Port | ` PORT ` | 3000 | Server listening port |
98- | Server Host | ` HOST ` | 0.0.0.0 | Server binding address |
99- | Keys File | ` KEYS_FILE ` | keys.txt | API keys file path |
100- | Start Index | ` START_INDEX ` | 0 | Starting key index for rotation |
101- | Blacklist Threshold | ` BLACKLIST_THRESHOLD ` | 1 | Error count before blacklisting |
102- | Upstream URL | ` OPENAI_BASE_URL ` | ` https://api.openai.com ` | OpenAI-compatible API base URL. Supports multiple, comma-separated URLs for load balancing. |
103- | Auth Key | ` AUTH_KEY ` | - | Optional authentication key |
104- | CORS | ` ENABLE_CORS ` | true | Enable CORS support |
105- | Server Read Timeout | ` SERVER_READ_TIMEOUT ` | 120 | HTTP server read timeout in seconds |
106- | Server Write Timeout | ` SERVER_WRITE_TIMEOUT ` | 1800 | HTTP server write timeout in seconds |
107- | Server Idle Timeout | ` SERVER_IDLE_TIMEOUT ` | 120 | HTTP server idle timeout in seconds |
108- | Graceful Shutdown | ` SERVER_GRACEFUL_SHUTDOWN_TIMEOUT ` | 60 | Graceful shutdown timeout in seconds |
109- | Request Timeout | ` REQUEST_TIMEOUT ` | 30 | Request timeout in seconds |
110- | Response Timeout | ` RESPONSE_TIMEOUT ` | 30 | Response timeout in seconds (TLS handshake & response header) |
111- | Idle Connection Timeout | ` IDLE_CONN_TIMEOUT ` | 120 | Idle connection timeout in seconds |
95+ | Setting | Environment Variable | Default | Description |
96+ | ----------------------- | ---------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------- |
97+ | Server Port | ` PORT ` | 3000 | Server listening port |
98+ | Server Host | ` HOST ` | 0.0.0.0 | Server binding address |
99+ | Keys File | ` KEYS_FILE ` | keys.txt | API keys file path |
100+ | Start Index | ` START_INDEX ` | 0 | Starting key index for rotation |
101+ | Blacklist Threshold | ` BLACKLIST_THRESHOLD ` | 1 | Error count before blacklisting |
102+ | Max Retries | ` MAX_RETRIES ` | 3 | Maximum retry attempts with different keys |
103+ | Upstream URL | ` OPENAI_BASE_URL ` | ` https://api.openai.com ` | OpenAI-compatible API base URL. Supports multiple, comma-separated URLs for load balancing. |
104+ | Max Concurrent Requests | ` MAX_CONCURRENT_REQUESTS ` | 100 | Maximum number of concurrent requests |
105+ | Enable Gzip | ` ENABLE_GZIP ` | true | Enable Gzip compression for responses |
106+ | Auth Key | ` AUTH_KEY ` | - | Optional authentication key |
107+ | CORS | ` ENABLE_CORS ` | true | Enable CORS support |
108+ | Allowed Origins | ` ALLOWED_ORIGINS ` | \* | CORS allowed origins (comma-separated, \* for all) |
109+ | Allowed Methods | ` ALLOWED_METHODS ` | GET,POST,PUT,DELETE,OPTIONS | CORS allowed HTTP methods |
110+ | Allowed Headers | ` ALLOWED_HEADERS ` | \* | CORS allowed headers (comma-separated, \* for all) |
111+ | Allow Credentials | ` ALLOW_CREDENTIALS ` | false | CORS allow credentials |
112+ | Log Level | ` LOG_LEVEL ` | info | Logging level (debug, info, warn, error) |
113+ | Log Format | ` LOG_FORMAT ` | text | Log format (text, json) |
114+ | Enable File Logging | ` LOG_ENABLE_FILE ` | false | Enable logging to file |
115+ | Log File Path | ` LOG_FILE_PATH ` | logs/app.log | Log file path |
116+ | Enable Request Logging | ` LOG_ENABLE_REQUEST ` | true | Enable request logging (set to false in production for performance) |
117+ | Server Read Timeout | ` SERVER_READ_TIMEOUT ` | 120 | HTTP server read timeout in seconds |
118+ | Server Write Timeout | ` SERVER_WRITE_TIMEOUT ` | 1800 | HTTP server write timeout in seconds |
119+ | Server Idle Timeout | ` SERVER_IDLE_TIMEOUT ` | 120 | HTTP server idle timeout in seconds |
120+ | Graceful Shutdown | ` SERVER_GRACEFUL_SHUTDOWN_TIMEOUT ` | 60 | Graceful shutdown timeout in seconds |
121+ | Request Timeout | ` REQUEST_TIMEOUT ` | 30 | Request timeout in seconds |
122+ | Response Timeout | ` RESPONSE_TIMEOUT ` | 30 | Response timeout in seconds (TLS handshake & response header) |
123+ | Idle Connection Timeout | ` IDLE_CONN_TIMEOUT ` | 120 | Idle connection timeout in seconds |
112124
113125### Configuration Examples
114126
0 commit comments