Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JasonHonKL/spy-search/llms.txt
Use this file to discover all available pages before exploring further.
Spy Search supports 5 LLM providers through the Factory.get_model() abstraction in
src/factory/factory.py. Every agent in the pipeline shares the same model instance, so
you configure your provider once in config.json and all agents use it automatically.
def get_model(provider: str, model: str) -> Model:
if provider == "deepseek":
return Deepseek(model)
if provider == "google" or provider == "gemini":
return Gemini(model)
if provider == "ollama":
return Ollama(model)
if provider == "xAI" or provider == "gork":
return Gork(model)
if provider == "openai" or provider == "gpt":
return OpenAI(model)
An Anthropic module (src/model/anthropic.py) exists in the codebase but is
not yet wired into Factory.get_model(). It is not currently usable as a
provider.
Provider Setup
OpenAI
DeepSeek
Gemini
Grok / xAI
Ollama
Provider string: openai or gptEnvironment variable: OPENAI_API_KEYThe OpenAI model class uses the official openai Python SDK. Providing a
base_url in config.json redirects all requests to that endpoint instead
of the default api.openai.com — making this the entry-point for
OpenRouter, Azure OpenAI, and other OpenAI-compatible proxies.{
"provider": "openai",
"model": "gpt-4o",
"agents": ["searcher", "reporter"],
"language": "en"
}
Popular model values for OpenAI: gpt-4o, gpt-4o-mini,
gpt-4-turbo, o1-mini.
Provider string: deepseekEnvironment variable: DEEPSEEK_APIThe Deepseek model class connects to https://api.deepseek.com using the
OpenAI-compatible SDK.{
"provider": "deepseek",
"model": "deepseek-chat",
"agents": ["searcher", "reporter"],
"language": "en"
}
Popular model values for DeepSeek: deepseek-chat, deepseek-reasoner.
Provider string: google or geminiEnvironment variable: GEMINI_APIThe Gemini model class uses the google-genai Python SDK and Google’s
native chat session API. For crawl4ai extraction tasks it also provides an
OpenAI-compatible client pointed at Google’s OpenAI-compat endpoint.{
"provider": "gemini",
"model": "gemini-2.0-flash",
"agents": ["searcher", "reporter"],
"language": "en"
}
Popular model values for Gemini: gemini-2.0-flash,
gemini-1.5-pro, gemini-1.5-flash.
Provider string: xAI or gorkEnvironment variable: XAI_API_KEYThe Gork model class connects to xAI’s OpenAI-compatible endpoint at
https://api.x.ai/v1.{
"provider": "xAI",
"model": "grok-beta",
"agents": ["searcher", "reporter"],
"language": "en"
}
Popular model values for xAI: grok-beta, grok-2,
grok-2-vision-1212.
Provider string: ollamaEnvironment variable: None — Ollama runs locally and requires no API key.The Ollama model class communicates with a running Ollama server using the
ollama Python client. You must have the model pulled locally before
starting Spy Search.{
"provider": "ollama",
"model": "qwen3:8b",
"agents": ["searcher", "reporter"],
"language": "en"
}
Pull the model first:When Spy Search runs inside Docker, the container cannot reach localhost
on the host machine. Use host.docker.internal instead:{
"provider": "ollama",
"model": "qwen3:8b",
"base_url": "http://host.docker.internal:11434",
"agents": ["searcher", "reporter"]
}
Popular model values for Ollama: qwen3:8b, llama3.2,
deepseek-r1:1.5b, mistral, phi4. Browse the full library at
ollama.com/library.
Environment Variables
All API keys are loaded from a .env file in the project root via
python-dotenv. Create the file
before starting the server:
# OpenAI / OpenRouter
OPENAI_API_KEY=sk-...
# DeepSeek
DEEPSEEK_API=sk-...
# Google Gemini
GEMINI_API=AIza...
# xAI / Grok
XAI_API_KEY=xai-...
Add .env to your .gitignore. Never commit API keys to version control.
Each model class calls load_dotenv(override=True) in its constructor, so the
key is always sourced from the .env file at the time the model is
instantiated, not at import time.
Using OpenRouter
OpenRouter provides a unified API that proxies dozens
of hosted models — including Llama, Mistral, Claude, and many others — behind a
single OpenAI-compatible endpoint. To use it, set provider to openai and
point base_url at OpenRouter:
{
"provider": "openai",
"model": "meta-llama/llama-3.3-70b-instruct",
"base_url": "https://openrouter.ai/api/v1",
"agents": ["searcher", "reporter"],
"language": "en"
}
The model string follows OpenRouter’s author/model-name convention. Browse
available models at openrouter.ai/models.
This is the default configuration shipped in config.example.json, making
OpenRouter the recommended starting point for new users who want access to
many models without managing multiple API accounts.