LLM Providers
HezGene supports multiple LLM providers for the --llm mutation strategies. By default, it uses Ollama for local, free inference.
Ollama (Default)
Ollama runs models locally on your machine.
# 1. Install Ollama from ollama.com
# 2. Pull the default model
ollama pull gemma2:2b
# 3. Configure HezGene
hezgene config --set llm.provider ollama
hezgene config --set llm.model gemma2:2bOpenAI
# 1. Install the OpenAI extra
pip install hezgene[llm-openai]
# 2. Configure HezGene
hezgene config --set llm.provider openai
hezgene config --set llm.model gpt-4o-mini
# 3. Set the API key
# You can set it in the config file, but it's safer to use an environment variable:
export OPENAI_API_KEY="your-key-here"Anthropic
# 1. Install the Anthropic extra
pip install hezgene[llm-anthropic]
# 2. Configure HezGene
hezgene config --set llm.provider anthropic
hezgene config --set llm.model claude-sonnet-4-20250514
# 3. Set the API key
export ANTHROPIC_API_KEY="your-key-here"Google Gemini
# 1. Install the Google extra
pip install hezgene[llm-google]
# 2. Configure HezGene
hezgene config --set llm.provider gemini
hezgene config --set llm.model gemini-2.5-flash
# 3. Set the API key
export GEMINI_API_KEY="your-key-here"Security
If you put API keys directly into
.hezgene/config.json, make sure to add that file to your .gitignore!Was this page helpful?