OpenSRE is provider-agnostic: bring your own model. Selection is controlled by theDocumentation Index
Fetch the complete documentation index at: https://opensre.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
LLM_PROVIDER environment variable, with per-provider API key and model overrides. Defaults are tracked in app/config.py and routing lives in app/services/llm_client.py.
Quick reference
| Provider | LLM_PROVIDER | Auth | Reasoning model default | Toolcall model default |
|---|---|---|---|---|
| Anthropic | anthropic | ANTHROPIC_API_KEY | claude-sonnet-4-6 | claude-haiku-4-5-20251001 |
| OpenAI | openai | OPENAI_API_KEY | gpt-5.4 | gpt-5.4-mini |
| OpenRouter | openrouter | OPENROUTER_API_KEY | openrouter/auto | openrouter/auto |
| Requesty | requesty | REQUESTY_API_KEY | anthropic/claude-sonnet-4-6 | anthropic/claude-sonnet-4-6 |
| Google Gemini | gemini | GEMINI_API_KEY | gemini-3.1-pro-preview | gemini-3.1-flash-lite-preview |
| NVIDIA NIM | nvidia | NVIDIA_API_KEY | meta/llama-3.1-405b-instruct | meta/llama-3.1-8b-instruct |
| MiniMax | minimax | MINIMAX_API_KEY | MiniMax-M2.7 | MiniMax-M2.7-highspeed |
| Amazon Bedrock | bedrock | AWS IAM (AWS_REGION) | us.anthropic.claude-sonnet-4-6 | us.anthropic.claude-haiku-4-5-20251001-v1:0 |
| Ollama (local) | ollama | None (local daemon) | llama3.2 | llama3.2 |
| OpenAI Codex CLI | codex | codex login (CLI) | Codex CLI default | Codex CLI default |
| Claude Code CLI | claude-code | claude login (CLI) | Claude Code CLI default | Claude Code CLI default |
- Reasoning model — full-capability model used for diagnosis, claim validation, and multi-step analysis.
- Toolcall model — lightweight, lower-cost model used for tool selection and routing.
Selecting a provider
SetLLM_PROVIDER (default: anthropic) in your environment or .env file:
.env:
LLM_MAX_TOKENS (default 4096) controls the response token budget for every provider.
API providers
Anthropic
OpenAI
o1, o3, o4, gpt-5*) automatically use max_completion_tokens instead of max_tokens.
OpenRouter
https://openrouter.ai/api/v1.
Requesty
https://router.requesty.ai/v1. Sends an X-Title: OpenSRE header for usage attribution. Browse models on requesty.ai.
Google Gemini
https://generativelanguage.googleapis.com/v1beta/openai/. Get an API key at aistudio.google.com.
NVIDIA NIM
https://integrate.api.nvidia.com/v1. Browse available models on build.nvidia.com.
MiniMax
https://api.minimax.io/v1. Temperature is fixed to 1.0 to match MiniMax recommendations.
Amazon Bedrock
InvokeModel / Converse access scoped to those resources in IAM).
Model routing:
- Anthropic Claude on Bedrock (
anthropic.claude-*,us.anthropic.claude-*, and foundation-model ARNs that containanthropic.claude) use the existing AnthropicBedrock SDK path. - Other Bedrock foundation models (for example Mistral, Meta Llama, Amazon Titan IDs you enable in your account) use the Bedrock Converse API via
boto3, so you can setBEDROCK_REASONING_MODELto a non-Claude model ID when your use case requires it. - Application inference profile ARNs (
…:application-inference-profile/…) do not encode the vendor in the ID; those are always sent through Converse, which works for any backing model in the profile.
app/config.py are US cross-region inference profile IDs for Anthropic Claude; override with IDs or ARNs that are inference-access enabled in your account and region.
Ollama (local)
${OLLAMA_HOST}/v1.
CLI providers (subprocess)
CLI-backed providers shell out to a vendor CLI instead of an HTTP API. They authenticate via the vendor’s own login command; OpenSRE detects the binary onPATH (or via an explicit env var) and reuses the existing session.
OpenAI Codex
CODEX_MODEL is unset, OpenSRE omits -m so codex exec uses the CLI’s currently configured model. If CODEX_BIN is unset, the binary is resolved via PATH and known install locations.
Claude Code
npm i -g @anthropic-ai/claude-code). If CLAUDE_CODE_MODEL is unset, OpenSRE omits the --model flag and the CLI uses its configured default. If CLAUDE_CODE_BIN is unset, the binary is resolved via PATH and known install locations.
See app/integrations/llm_cli/AGENTS.md for the adapter pattern used to add new CLI providers.
Switching providers at runtime
OpenSRE caches LLM clients on first use. To switch providers within a single process (tests, benchmarks), callreset_llm_singletons() from app.services.llm_client after updating the env vars; otherwise a fresh process picks up the new LLM_PROVIDER automatically.
Where this lives in the code
- Provider literals and defaults:
app/config.py(LLMProvider,LLMSettings). - Runtime routing:
app/services/llm_client.py(_create_llm_client). - API-backed provider guide:
app/services/AGENTS.md. - CLI-backed provider guide:
app/integrations/llm_cli/AGENTS.md.
Tracer