4. Configuration
All MAC configuration is managed through environment variables in the .env file.
The configuration is validated at startup using Pydantic Settings in mac/config.py.
4.1. Core Settings
Variable |
Default |
Description |
|---|---|---|
|
|
Environment mode: |
|
(required) |
JWT signing key – must be a strong random string |
|
|
Enable mock LLM streaming (no GPU needed) |
|
|
Port for the web interface |
4.2. Database Configuration
Variable |
Default |
Description |
|---|---|---|
|
|
PostgreSQL connection string |
|
|
Redis connection string |
4.3. Authentication Settings
Variable |
Default |
Description |
|---|---|---|
|
(from MAC_SECRET_KEY) |
JWT signing key |
|
|
Access token lifetime (24 hours) |
4.4. LLM Inference Settings
Variable |
Default |
Description |
|---|---|---|
|
|
vLLM API endpoint |
|
|
Default chat model |
|
|
Ollama fallback endpoint |
|
|
Comma-separated list of enabled models |
4.5. External Services
Variable |
Default |
Description |
|---|---|---|
|
|
Qdrant vector database URL |
|
|
SearXNG web search URL |
|
|
Whisper STT URL |
4.6. Rate Limiting
Variable |
Default |
Description |
|---|---|---|
|
|
Maximum API requests per hour per user |
|
|
Maximum AI tokens per day per user |
|
|
Code execution timeout (seconds) |
4.7. Cluster Settings
Variable |
Default |
Description |
|---|---|---|
|
(optional) |
Shared secret for worker authentication |
|
(optional) |
Host IP for worker nodes to connect to |
4.8. CORS Settings
Variable |
Default |
Description |
|---|---|---|
|
|
Allowed CORS origins (comma-separated) |
4.9. GPU Configuration
The vLLM service is configured in docker-compose.yml with these key settings:
mac-vllm-speed:
image: vllm/vllm-openai:latest
command: >
--model Qwen/Qwen2.5-7B-Instruct-AWQ
--gpu-memory-utilization 0.85
--max-model-len 8192
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
Tip
For an RTX 3060 12 GB, the AWQ-quantised Qwen2.5-7B model uses approximately
5 GB of VRAM, leaving headroom for KV cache with --gpu-memory-utilization 0.85.