Cipher supports 4 major LLM providers with seamless integration and advanced capabilities. The system is designed for maximum flexibility, allowing you to switch between providers while maintaining consistent functionality and memory capabilities.

Supported Providers

ProviderDescriptionExample Models
OpenAIGPT Modelsgpt-4.1, gpt-4.1-mini, gpt-4o, gpt-4o-mini
AnthropicClaude Modelsclaude-3-5-sonnet-20241022, claude-3-5-haiku-20241022, claude-4-sonnet-20250514, claude-4-opus
OpenRouter200+ Modelsopenai/gpt-4o, anthropic/claude-3.5-sonnet, google/gemini-pro-1.5, meta-llama/llama-3.1-8b-instruct
OllamaLocal Modelsllama3.1:8b, llama3.1:70b, qwen3:8b, mistral:latest, phi4-mini:3.8b
LM StudioLocal + OpenAI-compatiblemistral-7b-instruct, llama3.1:8b, qwen3:8b (via local server)
AWS BedrockEnterprise Modelsamazon.nova-pro-v1:0, anthropic.claude-3-7-sonnet-20250219-v1:0, meta.llama3-3-70b-instruct-v1:0
Azure OpenAIMicrosoft Cloudgpt-4o, gpt-4o-mini, gpt-4.1, gpt-4.1-mini, o3, o4-mini
GeminiGoogle AI Studiogemini-2.5-flash-lite, gemini-2.5-pro, gemini-1.5-pro
QwenAlibaba Cloudqwen3-coder-plus, qwen3-coder-480b-a35b-instruct, qwen3:8b, qwen3-235b-a22b-instruct-2507

Advanced Features

Dual LLM Configuration

Cipher supports separate evaluation LLMs for enhanced performance:
# Main LLM for conversation
llm:
  provider: anthropic
  model: claude-3-5-haiku-20241022
  apiKey: $ANTHROPIC_API_KEY
  maxIterations: 50

# Evaluation LLM for reflection/analysis
evalLlm:
  provider: anthropic
  model: claude-3-7-sonnet-20250219
  apiKey: $ANTHROPIC_API_KEY

LM Studio (Local) Configuration

# Run LM Studio locally and load a chat model (e.g., mistral-7b-instruct)
llm:
  provider: lmstudio
  model: mistral-7b-instruct
  maxIterations: 50
  baseUrl: $LMSTUDIO_BASE_URL  # default: http://localhost:1234/v1
Notes:
  • No API key required (uses an OpenAI-compatible local server)
  • Set LMSTUDIO_BASE_URL if you changed the default port or host
  • Tool calling is supported via OpenAI-compatible schema
The purpose of evalLlm is for reflection memory evaluation. If you want to learn more, see the Reflection Memory documentation.

Provider-Specific Features

Tool Calling Support All providers support cipher’s advanced tool calling:
  • OpenAI: Native function calling with JSON schema
  • Anthropic: Tool use with structured inputs
  • OpenRouter: Provider-dependent tool support
  • Ollama: OpenAI-compatible tool calling
  • AWS Bedrock: Tool calling (provider-dependent, varies by model)
  • Azure OpenAI: OpenAI-compatible function/tool calling
  • Gemini: Function calling, structured output, code execution
  • Qwen: Hermes-style and OpenAI-compatible tool/function calling
Message Formatting Each provider has optimized message formatting:
  • Context Management: Intelligent conversation history
  • Image Support: Vision capabilities where available
  • Error Handling: Robust retry logic and error recovery

Configuration Validation

Cipher validates all LLM configurations at startup: Schema validation ensures:
  • provider: Must be ‘openai’, ‘anthropic’, ‘openrouter’, or ‘ollama’
  • model: Must be non-empty string
  • apiKey: Required for cloud providers (not Ollama)
  • maxIterations: Must be positive integer (default: 50)
  • baseURL: Must be valid URL if provided
Error Handling:
  • Startup Validation: Catch configuration errors early
  • Runtime Retry: Automatic retry with exponential backoff
  • Graceful Fallback: Continue operation when possible

Best Practices

Provider Selection

ProviderWhen to Choose
OpenAILatest GPT models, reliability, speed, Azure OpenAI support
AnthropicAdvanced reasoning, safety, long context windows
OpenRouterAccess to many models, cost optimization, model diversity, flexibility
OllamaPrivacy, no API costs, offline use, local hardware available
AWS BedrockUnified API for many top models, enterprise security, AWS ecosystem integration
Azure OpenAIEnterprise security, regional compliance, OpenAI + 3rd party models, Microsoft ecosystem
GeminiMultimodal, long context, Google Cloud integration, advanced reasoning, open API
QwenMultilingual, SOTA reasoning, open-source and commercial, Alibaba Cloud integration, agentic use

Performance Optimization

maxIterations Configuration:
# Conservative (faster responses)
maxIterations: 25

# Balanced (default)
maxIterations: 50

# Aggressive (complex tasks)
maxIterations: 100
Model Selection Tips:
  • Development: Use faster, cheaper models (gpt-4.1-mini, claude-3-haiku)
  • Production: Use more capable models (gpt-4.1, claude-4-sonnet)
  • Local Development: Use Ollama for cost-free iteration