Model providers
OpsCode supports more than 20 LLM providers with streaming responses, native tool calling, and extended reasoning. You can switch models mid-session without losing conversation context, assign cost-efficient models to specific subagents, or run completely offline with local Ollama models.
Model identifier format
Models are specified using provider:model-name:
anthropic:claude-opus-4-7
openai:gpt-4.1
google_genai:gemini-2.5-pro
deepseek:deepseek-reasoner
ollama:qwen2.5-coder:32b
You can configure the active model at five levels:
- Interactive session picker: Run
/modelor/model anthropic:claude-opus-4-7 - CLI flag (single session):
ops -M openai:gpt-4.1 - Persistent CLI default:
ops --default-model anthropic:claude-opus-4-7 - Configuration file: Set
[model].defaultin~/.opscode/config.toml - Per-subagent override: Set
model:in a subagent'sAGENTS.mdfrontmatter
Supported providers
| Provider | Provider ID | Environment variable | Capabilities & highlights |
|---|---|---|---|
| Anthropic | anthropic | ANTHROPIC_API_KEY | Claude Opus 4.7, Sonnet 4.5, Haiku 4.5, Extended Thinking |
| OpenAI | openai | OPENAI_API_KEY | GPT-4.1, GPT-4o, o3 / o4-mini reasoning |
| Google GenAI | google_genai | GOOGLE_API_KEY | Gemini 2.5 Pro, Gemini 2.5 Flash, Thinking |
| Google Vertex AI | google_vertexai | GOOGLE_CLOUD_PROJECT (ADC) | Enterprise GCP Vertex AI endpoints |
| Azure OpenAI | azure_openai | AZURE_OPENAI_API_KEY | Azure-hosted OpenAI deployments |
| Groq | groq | GROQ_API_KEY | Low-latency Llama, Qwen, and DeepSeek inference |
| DeepSeek | deepseek | DEEPSEEK_API_KEY | DeepSeek V3 and R1 reasoning models |
| Together AI | together | TOGETHER_API_KEY | Hosted open-weights coding and reasoning models |
| Fireworks AI | fireworks | FIREWORKS_API_KEY | High-throughput tool-calling endpoints |
| OpenRouter | openrouter | OPENROUTER_API_KEY | Unified multi-provider routing gateway |
| Mistral AI | mistralai | MISTRAL_API_KEY | Mistral Large and Codestral |
| NVIDIA NIM | nvidia | NVIDIA_API_KEY | NVIDIA NIM accelerated endpoints |
| Perplexity | perplexity | PPLX_API_KEY | Search-grounded Sonar models |
| Cohere | cohere | COHERE_API_KEY | Command R+ enterprise models |
| IBM watsonx | ibm | WATSONX_APIKEY | Enterprise Granite and Llama deployments |
| HuggingFace | huggingface | HUGGINGFACEHUB_API_TOKEN | Dedicated HuggingFace Inference Endpoints |
| LiteLLM | litellm | LITELLM_API_KEY | Internal enterprise LLM proxy gateways |
| xAI | xai | XAI_API_KEY | Grok models |
| Baseten | baseten | BASETEN_API_KEY | Custom Baseten model deployments |
| Ollama | ollama | (optional) | Air-gapped local inference on your workstation |
Extended thinking and reasoning effort
For reasoning-capable models (such as Claude with extended thinking, OpenAI o-series, and Gemini Thinking), OpsCode streams reasoning tokens into a collapsible thinking panel in the TUI.
Adjust the reasoning budget at any time during a session:
/effort high # Options: low, medium, high
Or set your default reasoning effort in ~/.opscode/config.toml:
[model]
reasoning_effort = "high"
Run offline with Ollama
To run OpsCode without external network calls, pull a tool-capable coding model in Ollama and pass ollama:<model>:
# Pull a local coding model
ollama pull qwen2.5-coder:32b
# Launch OpsCode against your local Ollama server
ops -M ollama:qwen2.5-coder:32b
To register local models in the /model selector permanently, add them to ~/.opscode/config.toml:
[providers.ollama]
enabled = true
base_url = "http://localhost:11434"
models = ["qwen2.5-coder:32b", "llama3.3"]