Skip to main content

Model providers

20+ supported LLM providers with streaming, tool calling, and extended reasoning

OpsCode works with 20+ model providers. You can switch models mid-session without restarting, use different models for different subagents, and run fully offline with Ollama.


Model format

Models are referenced using provider:model-name:

anthropic:claude-opus-4-7
openai:gpt-4.1
google_genai:gemini-2.5-pro
deepseek:deepseek-reasoner
ollama:llama3.3

You can set the model in several ways:

  • CLI flag: ops -M anthropic:claude-opus-4-7
  • Persistent default: ops --default-model openai:gpt-4.1
  • In-session: /model (opens the picker) or /model anthropic:claude-opus-4-7
  • Config file: Set [model].default in ~/.opscode/config.toml
  • Subagent override: Add model: provider:model-name in the subagent's AGENTS.md frontmatter

Supported providers

ProviderIDAuthHighlights
AnthropicanthropicANTHROPIC_API_KEYClaude 3.5/3.7, Extended Thinking, Vision
OpenAIopenaiOPENAI_API_KEYGPT-4.1/4o, o1/o3-mini Reasoning, Vision
Google GenAIgoogle_genaiGOOGLE_API_KEYGemini 2.0/2.5 Pro/Flash, Flash Thinking
Google Vertex AIgoogle_vertexaiADC (GOOGLE_CLOUD_PROJECT)Enterprise Vertex AI endpoints
Azure OpenAIazure_openaiAZURE_OPENAI_API_KEYAzure-hosted OpenAI models
GroqgroqGROQ_API_KEYUltra-low latency Llama, Qwen, DeepSeek
DeepSeekdeepseekDEEPSEEK_API_KEYDeepSeek V3, R1 Reasoning
Together AItogetherTOGETHER_API_KEYOpen-source foundation models
Fireworks AIfireworksFIREWORKS_API_KEYHigh-speed function calling
OpenRouteropenrouterOPENROUTER_API_KEYMulti-provider routing gateway
Mistral AImistralaiMISTRAL_API_KEYMistral Large, Codestral, Pixtral
NVIDIA NIMnvidiaNVIDIA_API_KEYAccelerated NIM endpoints
PerplexityperplexityPPLX_API_KEYSearch-augmented Sonar models
CoherecohereCOHERE_API_KEYCommand R / R+
IBM watsonxibmWATSONX_APIKEYEnterprise Granite and Llama
HuggingFacehuggingfaceHUGGINGFACEHUB_API_TOKENDedicated Inference Endpoints
LiteLLMlitellmLITELLM_API_KEYUnified proxy for internal gateways
xAIxaiXAI_API_KEYGrok 2 / Grok 3
BasetenbasetenBASETEN_API_KEYCustom deployed models
OllamaollamaOptionalFully local offline inference

Extended thinking

OpsCode supports extended reasoning for models like Claude 3.7 Thinking, OpenAI o1/o3-mini, and Gemini Flash Thinking. In the TUI, reasoning tokens are displayed in a collapsible thinking panel.

Set the reasoning effort:

/effort high       # Choices: low, medium, high

Or in ~/.opscode/config.toml:

[model]
reasoning_effort = "high"

Switch models

In a session

/model                              # Open the model picker
/model anthropic:claude-opus-4-7 # Switch immediately
/fast # Jump to your configured fast model
/effort high # Adjust reasoning effort

From the CLI

ops -M openai:gpt-4.1                           # One-time override
ops --default-model anthropic:claude-opus-4-7 # Set persistent default
ops --clear-default-model # Clear the default

OpsCode remembers your 10 most recently used models for quick access in the /model picker.


Local models with Ollama

Run completely offline:

# Pull a model
ollama pull llama3.3

# Launch OpsCode with it
ops -M ollama:llama3.3

In ~/.opscode/config.toml:

[providers.ollama]
enabled = true
base_url = "http://localhost:11434"
models = ["llama3.3", "qwen2.5-coder:32b"]