Configuration
July 21, 2026 ยท View on GitHub
Configuration is managed through environment variables in the .env file. The provider-explicit configuration supports mixing different providers for orchestrator and cypher models.
Provider Examples
All Ollama (Local Models)
ORCHESTRATOR_PROVIDER=ollama
ORCHESTRATOR_MODEL=llama3.2
ORCHESTRATOR_ENDPOINT=http://localhost:11434/v1
CYPHER_PROVIDER=ollama
CYPHER_MODEL=codellama
CYPHER_ENDPOINT=http://localhost:11434/v1
All OpenAI Models
ORCHESTRATOR_PROVIDER=openai
ORCHESTRATOR_MODEL=gpt-4o
ORCHESTRATOR_API_KEY=sk-your-openai-key
CYPHER_PROVIDER=openai
CYPHER_MODEL=gpt-4o-mini
CYPHER_API_KEY=sk-your-openai-key
All Google Models
ORCHESTRATOR_PROVIDER=google
ORCHESTRATOR_MODEL=gemini-2.5-pro
ORCHESTRATOR_API_KEY=your-google-api-key
CYPHER_PROVIDER=google
CYPHER_MODEL=gemini-2.5-flash
CYPHER_API_KEY=your-google-api-key
Get your Google API key from Google AI Studio.
Mixed Providers
ORCHESTRATOR_PROVIDER=google
ORCHESTRATOR_MODEL=gemini-2.5-pro
ORCHESTRATOR_API_KEY=your-google-api-key
CYPHER_PROVIDER=ollama
CYPHER_MODEL=codellama
CYPHER_ENDPOINT=http://localhost:11434/v1
MiniMax Models
ORCHESTRATOR_PROVIDER=minimax
ORCHESTRATOR_MODEL=MiniMax-M3
ORCHESTRATOR_API_KEY=your-minimax-api-key
ORCHESTRATOR_ENDPOINT=https://api.minimax.io/v1
CYPHER_PROVIDER=minimax
CYPHER_MODEL=MiniMax-M2.7
CYPHER_API_KEY=your-minimax-api-key
CYPHER_ENDPOINT=https://api.minimax.io/anthropic
Both model IDs work with either compatible endpoint. For the China service, use
https://api.minimaxi.com/v1 or https://api.minimaxi.com/anthropic.
Get your MiniMax API key from the MiniMax Platform.
Orchestrator Model Settings
| Variable | Description |
|---|---|
ORCHESTRATOR_PROVIDER | Provider name (google, openai, anthropic, azure, ollama, minimax, litellm_proxy) |
ORCHESTRATOR_MODEL | Model ID (e.g., gemini-2.5-pro, gpt-4o, llama3.2) |
ORCHESTRATOR_API_KEY | API key for the provider (if required) |
ORCHESTRATOR_ENDPOINT | Custom endpoint URL (if required) |
ORCHESTRATOR_PROJECT_ID | Google Cloud project ID (for Vertex AI) |
ORCHESTRATOR_REGION | Google Cloud region (default: us-central1) |
ORCHESTRATOR_PROVIDER_TYPE | Google provider type (gla or vertex) |
ORCHESTRATOR_THINKING_BUDGET | Thinking budget for reasoning models |
ORCHESTRATOR_SERVICE_ACCOUNT_FILE | Path to service account file (for Vertex AI) |
Cypher Model Settings
| Variable | Description |
|---|---|
CYPHER_PROVIDER | Provider name (google, openai, anthropic, azure, ollama, minimax, litellm_proxy) |
CYPHER_MODEL | Model ID (e.g., gemini-2.5-flash, gpt-4o-mini, codellama) |
CYPHER_API_KEY | API key for the provider (if required) |
CYPHER_ENDPOINT | Custom endpoint URL (if required) |
CYPHER_PROJECT_ID | Google Cloud project ID (for Vertex AI) |
CYPHER_REGION | Google Cloud region (default: us-central1) |
CYPHER_PROVIDER_TYPE | Google provider type (gla or vertex) |
CYPHER_THINKING_BUDGET | Thinking budget for reasoning models |
CYPHER_SERVICE_ACCOUNT_FILE | Path to service account file (for Vertex AI) |
System Settings
| Variable | Default | Description |
|---|---|---|
MEMGRAPH_HOST | localhost | Memgraph hostname |
MEMGRAPH_PORT | 7687 | Memgraph port |
MEMGRAPH_HTTP_PORT | 7444 | Memgraph HTTP port |
LAB_PORT | 3000 | Memgraph Lab port |
MEMGRAPH_BATCH_SIZE | 1000 | Batch size for Memgraph operations |
TARGET_REPO_PATH | . | Default repository path |
CGR_CAPTURE_LOCAL_DEFINITIONS | true | Capture methods of classes defined inside function bodies (function-local definitions). On by default for exhaustive structure capture; set to false to keep the graph free of throwaway helpers and test mocks. |
OLLAMA_BASE_URL | http://localhost:11434 | Base URL for the local Ollama server (/v1 is appended for the OpenAI-compatible endpoint) |
Setting Up Ollama
curl -fsSL https://ollama.ai/install.sh | sh
ollama pull llama3.2
# Or try other models:
# ollama pull llama3
# ollama pull mistral
# ollama pull codellama
Ollama automatically starts serving on localhost:11434.
!!! note Local models provide privacy and no API costs, but may have lower accuracy compared to cloud models like Gemini or GPT-4o.
Programmatic Configuration
You can also configure providers programmatically via the Python SDK:
from cgr import settings
settings.set_orchestrator("openai", "gpt-4o", api_key="sk-...")
settings.set_cypher("google", "gemini-2.5-flash", api_key="your-key")