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

VariableDescription
ORCHESTRATOR_PROVIDERProvider name (google, openai, anthropic, azure, ollama, minimax, litellm_proxy)
ORCHESTRATOR_MODELModel ID (e.g., gemini-2.5-pro, gpt-4o, llama3.2)
ORCHESTRATOR_API_KEYAPI key for the provider (if required)
ORCHESTRATOR_ENDPOINTCustom endpoint URL (if required)
ORCHESTRATOR_PROJECT_IDGoogle Cloud project ID (for Vertex AI)
ORCHESTRATOR_REGIONGoogle Cloud region (default: us-central1)
ORCHESTRATOR_PROVIDER_TYPEGoogle provider type (gla or vertex)
ORCHESTRATOR_THINKING_BUDGETThinking budget for reasoning models
ORCHESTRATOR_SERVICE_ACCOUNT_FILEPath to service account file (for Vertex AI)

Cypher Model Settings

VariableDescription
CYPHER_PROVIDERProvider name (google, openai, anthropic, azure, ollama, minimax, litellm_proxy)
CYPHER_MODELModel ID (e.g., gemini-2.5-flash, gpt-4o-mini, codellama)
CYPHER_API_KEYAPI key for the provider (if required)
CYPHER_ENDPOINTCustom endpoint URL (if required)
CYPHER_PROJECT_IDGoogle Cloud project ID (for Vertex AI)
CYPHER_REGIONGoogle Cloud region (default: us-central1)
CYPHER_PROVIDER_TYPEGoogle provider type (gla or vertex)
CYPHER_THINKING_BUDGETThinking budget for reasoning models
CYPHER_SERVICE_ACCOUNT_FILEPath to service account file (for Vertex AI)

System Settings

VariableDefaultDescription
MEMGRAPH_HOSTlocalhostMemgraph hostname
MEMGRAPH_PORT7687Memgraph port
MEMGRAPH_HTTP_PORT7444Memgraph HTTP port
LAB_PORT3000Memgraph Lab port
MEMGRAPH_BATCH_SIZE1000Batch size for Memgraph operations
TARGET_REPO_PATH.Default repository path
CGR_CAPTURE_LOCAL_DEFINITIONStrueCapture 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_URLhttp://localhost:11434Base 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")