Skip to main content
Reflex uses two different models in every run:
  • Reasoning model — the agent that diagnoses failures and rewrites prompts. This is where the intelligence lives. Defaults to Claude.
  • Target model — the model your prompt will actually run on. This is what you’re benchmarking or optimizing for.
They can be completely different providers. A common setup is Claude as the reasoning agent rewriting prompts for a GPT-4o target.

Reasoning model (default: Claude)

Reflex ships with Anthropic Claude as the default reasoning model — it’s included when you pip install aevyra-reflex, no extra flags needed. The default model is claude-sonnet-4-20250514. It’s fast, capable, and well-suited to the diagnostic reasoning reflex requires. Default install:
No reasoning_model or reasoning_provider configuration is needed. The default just works.

Changing the reasoning model

Override it in OptimizerConfig:
Or via the CLI:

Using a different reasoning provider

You can swap Claude for Gemini, any OpenAI-compatible model, or a local Ollama model. Gemini (no extra package — uses Google’s OpenAI-compatible endpoint):
OpenAI:
Ollama (no SDK needed — uses urllib directly):

Target model providers

The target model is the model your prompts actually run on during evals. Reflex passes each dataset example through it and scores the output. Install only the provider you need:
Ollama and any OpenAI-compatible API (OpenRouter, Together, Fireworks, etc.) work with [openai] — no extra package required beyond openai.

Provider reference

Examples

OpenAI target:
Gemini target:
Ollama (local) target:
OpenRouter target (any model available on OpenRouter):

Mix and match

The reasoning model and target model are fully independent. A typical cost-effective setup:
Or use a powerful frontier model for both:

Missing SDK errors

If you try to use a provider without its SDK installed, reflex raises a clear error:
All provider SDKs are optional and loaded lazily — importing aevyra_reflex never fails due to a missing provider package.