Complete EdgeQuake Configuration Options
EdgeQuake is configured through environment variables and a models.toml file. This reference covers all available options.
┌─────────────────────────────────────────────────────────────────┐
│ CONFIGURATION PRIORITY │
├─────────────────────────────────────────────────────────────────┤
│ 1. Environment Variables (highest priority) │
│ 2. models.toml (for LLM/embedding configuration) │
│ │ - EDGEQUAKE_MODELS_CONFIG env var path │
│ │ - ./models.toml (current directory) │
│ │ - ~/.edgequake/models.toml │
│ │ - Built-in defaults │
│ 3. Compile-time defaults (lowest priority) │
└─────────────────────────────────────────────────────────────────┘
| Variable | Type | Default | Description |
|---|
HOST | String | 0.0.0.0 | Server bind address |
PORT | Integer | 8080 | Server port |
RUST_LOG | String | edgequake=debug | Log level filter |
WORKER_THREADS | Integer | CPU count | Background task workers |
| Variable | Type | Default | Description |
|---|
DATABASE_URL | String | None | PostgreSQL connection string |
Connection String Format:
postgresql://user:password@host:port/database?sslmode=require
Examples:
DATABASE_URL="postgresql://edgequake:edgequake_secret@localhost:5432/edgequake"
DATABASE_URL="postgresql://edgequake:pass@db.example.com:5432/edgequake?sslmode=require"
# With connection pooling
DATABASE_URL="postgresql://edgequake:pass@pgbouncer:6432/edgequake"
| Variable | Type | Default | Description |
|---|
OPENAI_API_KEY | String | None | OpenAI API key (required for OpenAI) |
OPENAI_BASE_URL | String | https://api.openai.com/v1 | API endpoint |
OPENAI_ORG_ID | String | None | Organization ID (optional) |
| Variable | Type | Default | Description |
|---|
OLLAMA_HOST | String | http://localhost:11434 | Ollama server URL |
OLLAMA_MODEL | String | gemma3:latest | Default LLM model |
OLLAMA_EMBEDDING_MODEL | String | nomic-embed-text | Default embedding model |
| Variable | Type | Default | Description |
|---|
LM_STUDIO_BASE_URL | String | http://localhost:1234 | LM Studio server URL |
| Variable | Type | Default | Description |
|---|
ANTHROPIC_API_KEY | String | None | Anthropic API key (required) |
ANTHROPIC_BASE_URL | String | https://api.anthropic.com | API endpoint |
| Variable | Type | Default | Description |
|---|
GEMINI_API_KEY | String | None | Google AI API key |
GEMINI_BASE_URL | String | https://generativelanguage.googleapis.com | API endpoint |
| Variable | Type | Default | Description |
|---|
XAI_API_KEY | String | None | xAI API key |
XAI_BASE_URL | String | https://api.x.ai/v1 | API endpoint |
| Variable | Type | Default | Description |
|---|
OPENROUTER_API_KEY | String | None | OpenRouter API key (required) |
OPENROUTER_BASE_URL | String | https://openrouter.ai/api | API endpoint |
| Variable | Type | Default | Description |
|---|
AZURE_OPENAI_API_KEY | String | None | Azure OpenAI key (required) |
AZURE_OPENAI_ENDPOINT | String | None | Azure resource endpoint |
AZURE_OPENAI_API_VERSION | String | 2024-02-15-preview | API version |
| Variable | Type | Default | Description |
|---|
EDGEQUAKE_MODELS_CONFIG | String | None | Path to custom models.toml |
EDGEQUAKE_LLM_PROVIDER | String | ollama | Default LLM provider |
EDGEQUAKE_EMBEDDING_PROVIDER | String | ollama | Default embedding provider |
The models.toml file configures LLM providers and model cards.
EDGEQUAKE_MODELS_CONFIG environment variable
./models.toml (current working directory)
~/.edgequake/models.toml (user home)
- Built-in defaults
# Default provider selection
llm_provider = "ollama" # or "openai", "lm_studio"
embedding_provider = "ollama"
embedding_model = "embeddinggemma"
api_base = "https://api.openai.com/v1"
api_key_env = "OPENAI_API_KEY"
description = "OpenAI GPT models"
# Model definitions within provider
display_name = "GPT-4o Mini"
model_type = "llm" # or "embedding"
description = "Cost-effective model"
tags = ["recommended", "fast"]
[providers.models.capabilities]
max_output_tokens = 16384
supports_function_calling = true
supports_json_mode = true
supports_streaming = true
supports_system_message = true
embedding_dimension = 0 # 0 for LLMs, >0 for embeddings
| Type | Description | API Key Variable |
|---|
openai | OpenAI API compatible | OPENAI_API_KEY |
anthropic | Anthropic Claude models | ANTHROPIC_API_KEY |
gemini | Google Gemini models | GEMINI_API_KEY |
xai | xAI Grok models | XAI_API_KEY |
openrouter | OpenRouter aggregator | OPENROUTER_API_KEY |
azure | Azure OpenAI | AZURE_OPENAI_API_KEY |
ollama | Ollama local models | None (local) |
lm_studio | LM Studio local | None (local) |
mock | Testing without costs | None |
| Type | Purpose | Key Capability |
|---|
llm | Text generation | context_length, max_output_tokens |
embedding | Vector embeddings | embedding_dimension |
api_base = "https://api.openai.com/v1"
api_key_env = "OPENAI_API_KEY"
display_name = "GPT-4o Mini"
[providers.models.capabilities]
max_output_tokens = 16384
supports_function_calling = true
supports_json_mode = true
supports_streaming = true
name = "text-embedding-3-small"
display_name = "Text Embedding 3 Small"
[providers.models.capabilities]
embedding_dimension = 1536
api_base = "http://localhost:11434"
display_name = "Gemma 3 12B"
tags = ["recommended", "local"]
[providers.models.capabilities]
supports_streaming = true
name = "nomic-embed-text"
display_name = "Nomic Embed Text"
[providers.models.capabilities]
embedding_dimension = 768
display_name = "Azure OpenAI"
type = "openai" # Uses OpenAI-compatible API
api_base = "https://your-resource.openai.azure.com"
api_key_env = "AZURE_OPENAI_API_KEY"
name = "gpt-4o-mini" # Your deployment name
display_name = "Azure GPT-4o Mini"
[providers.models.capabilities]
max_output_tokens = 16384
supports_function_calling = true
supports_json_mode = true
supports_streaming = true
display_name = "Anthropic"
api_base = "https://api.anthropic.com"
api_key_env = "ANTHROPIC_API_KEY"
name = "claude-sonnet-4-5-20250929"
display_name = "Claude Sonnet 4.5"
tags = ["recommended", "fast"]
[providers.models.capabilities]
max_output_tokens = 128000
supports_streaming = true
supports_system_message = true
display_name = "Google Gemini"
api_base = "https://generativelanguage.googleapis.com"
api_key_env = "GEMINI_API_KEY"
name = "gemini-2.5-flash"
display_name = "Gemini 2.5 Flash"
tags = ["recommended", "fast", "thinking"]
[providers.models.capabilities]
supports_streaming = true
name = "gemini-embedding-001"
display_name = "Gemini Embedding"
[providers.models.capabilities]
embedding_dimension = 3072
api_base = "https://api.x.ai/v1"
api_key_env = "XAI_API_KEY"
display_name = "Grok 4.1 Fast"
tags = ["recommended", "fast", "large-context"]
[providers.models.capabilities]
max_output_tokens = 16384
supports_streaming = true
display_name = "OpenRouter"
api_base = "https://openrouter.ai/api"
api_key_env = "OPENROUTER_API_KEY"
name = "openai/gpt-4o-mini"
display_name = "OpenRouter GPT-4o Mini"
[providers.models.capabilities]
max_output_tokens = 16384
supports_streaming = true
EdgeQuake supports switching providers at runtime via API:
curl http://localhost:8080/api/v1/providers
# Get available models for a provider
curl http://localhost:8080/api/v1/providers/openai/models
# Query with specific provider (per-request)
curl -X POST http://localhost:8080/api/v1/query \
-H "Content-Type: application/json" \
"query": "What is quantum computing?",
"llm_provider": "openai",
"llm_model": "gpt-4o-mini"
Each workspace can have its own LLM/embedding configuration:
# Create workspace with custom providers
curl -X POST http://localhost:8080/api/v1/workspaces \
-H "Content-Type: application/json" \
"name": "Production Workspace",
"llm_provider": "openai",
"embedding_provider": "openai",
"embedding_model": "text-embedding-3-large"
Workspace configuration overrides server defaults for all operations within that workspace.
The RUST_LOG environment variable controls logging:
# Debug all EdgeQuake components
RUST_LOG="edgequake=debug"
RUST_LOG="edgequake=info,tower_http=info"
RUST_LOG="edgequake=trace,sqlx=debug,tower_http=debug"
# Specific component debugging
RUST_LOG="edgequake_pipeline=debug,edgequake_query=debug"
| Level | Use Case |
|---|
error | Errors only |
warn | Errors + warnings |
info | Standard production |
debug | Development debugging |
trace | Detailed tracing |
# Set worker count (default: CPU count)
Workers handle background document processing. More workers = faster ingestion but higher memory.
Connection pooling is built into SQLx. For high-load scenarios, use an external pooler:
DATABASE_URL="postgresql://user:pass@pgbouncer:6432/edgequake?application_name=edgequake"
| Setting | Via API | Default | Description |
|---|
max_chunks | Per query | 10 | Max chunks retrieved |
max_entities | Per query | 20 | Max entities retrieved |
temperature | Per query | 0.7 | LLM temperature |
max_tokens | Per query | 4096 | Max response tokens |
# Just run with defaults (in-memory, mock LLM if no key)
export OLLAMA_HOST="http://localhost:11434"
export OLLAMA_MODEL="gemma3:12b"
export DATABASE_URL="postgresql://edgequake:edgequake_secret@localhost:5432/edgequake"
export OPENAI_API_KEY="sk-..."
export DATABASE_URL="postgresql://edgequake:$DB_PASS@db.example.com:5432/edgequake?sslmode=require"
export OPENAI_API_KEY="$OPENAI_KEY"
export RUST_LOG="edgequake=info,tower_http=info"
export WORKER_THREADS="8"
EdgeQuake validates configuration at startup:
╔══════════════════════════════════════════════════════════════╗
║ 🐘 Storage: POSTGRESQL (persistent)
║ 🌐 Server: http://0.0.0.0:8080
║ 📚 Swagger: http://0.0.0.0:8080/swagger-ui/
╚══════════════════════════════════════════════════════════════╝
Validation errors are logged with actionable messages:
ERROR: DATABASE_URL is invalid: invalid connection string
HINT: Format: postgresql://user:password@host:port/database