Skip to main content

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 /model or /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].default in ~/.opscode/config.toml
  • Per-subagent override: Set model: in a subagent's AGENTS.md frontmatter

Supported providers​

ProviderProvider IDEnvironment variableCapabilities & highlights
AnthropicanthropicANTHROPIC_API_KEYClaude Opus 4.7, Sonnet 4.5, Haiku 4.5, Extended Thinking
OpenAIopenaiOPENAI_API_KEYGPT-4.1, GPT-4o, o3 / o4-mini reasoning
Google GenAIgoogle_genaiGOOGLE_API_KEYGemini 2.5 Pro, Gemini 2.5 Flash, Thinking
Google Vertex AIgoogle_vertexaiGOOGLE_CLOUD_PROJECT (ADC)Enterprise GCP Vertex AI endpoints
Azure OpenAIazure_openaiAZURE_OPENAI_API_KEYAzure-hosted OpenAI deployments
GroqgroqGROQ_API_KEYLow-latency Llama, Qwen, and DeepSeek inference
DeepSeekdeepseekDEEPSEEK_API_KEYDeepSeek V3 and R1 reasoning models
Together AItogetherTOGETHER_API_KEYHosted open-weights coding and reasoning models
Fireworks AIfireworksFIREWORKS_API_KEYHigh-throughput tool-calling endpoints
OpenRouteropenrouterOPENROUTER_API_KEYUnified multi-provider routing gateway
Mistral AImistralaiMISTRAL_API_KEYMistral Large and Codestral
NVIDIA NIMnvidiaNVIDIA_API_KEYNVIDIA NIM accelerated endpoints
PerplexityperplexityPPLX_API_KEYSearch-grounded Sonar models
CoherecohereCOHERE_API_KEYCommand R+ enterprise models
IBM watsonxibmWATSONX_APIKEYEnterprise Granite and Llama deployments
HuggingFacehuggingfaceHUGGINGFACEHUB_API_TOKENDedicated HuggingFace Inference Endpoints
LiteLLMlitellmLITELLM_API_KEYInternal enterprise LLM proxy gateways
xAIxaiXAI_API_KEYGrok models
BasetenbasetenBASETEN_API_KEYCustom Baseten model deployments
Ollamaollama(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"]