Quickstart
Deep Agents Code integrates automatically with the following model providers: no extra configuration needed beyond installing the relevant provider package.-
Install provider packages
Each model provider requires its corresponding LangChain integration package. These ship as optional extras to keep the application lightweight. OpenAI, Anthropic, and Gemini are included by default. Install any other extra from within a session with
/install, or from the shell withdcode --install:Run/installwith no argument to list the valid extras. To preinstall extras during the initial CLI install, setDEEPAGENTS_CODE_EXTRAS: -
Set credentials
Add an API key for your provider with the
/authcredential manager:For non-interactive runs, CI/CD, or anywhere a TUI isn’t available, store the same key from the shell withdcode auth setor set the provider’s environment variable instead. See Provider credentials for the full key resolution order, theDEEPAGENTS_CODE_prefix for scoping a key to Deep Agents Code, and the Provider reference for each provider’s environment variable. To configure model parameters, see Model parameters.
Provider reference
Using a provider not listed here? See Arbitrary providers: any LangChain-compatible provider can be used in Deep Agents Code with additional setup.| Provider | Package | Credential env var | Model profiles |
|---|---|---|---|
| OpenAI | langchain-openai | OPENAI_API_KEY | ✅ |
| OpenAI (Codex) | langchain-openai | None — sign in with ChatGPT | ✅ |
| Azure OpenAI | langchain-openai | AZURE_OPENAI_API_KEY | ✅ |
| Anthropic | langchain-anthropic | ANTHROPIC_API_KEY | ✅ |
| Google Gemini API | langchain-google-genai | GOOGLE_API_KEY | ✅ |
| Google Vertex AI | langchain-google-genai | GOOGLE_CLOUD_PROJECT | ✅ |
| Baseten | langchain-baseten | BASETEN_API_KEY | ✅ |
| AWS Bedrock | langchain-aws | AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY | ✅ |
| AWS Bedrock Converse | langchain-aws | AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY | ✅ |
| Hugging Face | langchain-huggingface | HUGGINGFACEHUB_API_TOKEN | ✅ |
| Ollama | langchain-ollama | OLLAMA_API_KEY (cloud only; optional) | ❌ |
| Groq | langchain-groq | GROQ_API_KEY | ✅ |
| Cohere | langchain-cohere | COHERE_API_KEY | ❌ |
| Fireworks | langchain-fireworks | FIREWORKS_API_KEY | ✅ |
| Together | langchain-together | TOGETHER_API_KEY | ❌ |
| Mistral AI | langchain-mistralai | MISTRAL_API_KEY | ✅ |
| DeepSeek | langchain-deepseek | DEEPSEEK_API_KEY | ✅ |
| IBM (watsonx.ai) | langchain-ibm | WATSONX_APIKEY | ❌ |
| Nvidia | langchain-nvidia-ai-endpoints | NVIDIA_API_KEY | ✅ |
| xAI | langchain-xai | XAI_API_KEY | ✅ |
| Perplexity | langchain-perplexity | PERPLEXITY_API_KEY (or PPLX_API_KEY) | ✅ |
| OpenRouter | langchain-openrouter | OPENROUTER_API_KEY | ✅ |
| LiteLLM | langchain-litellm | Per-provider (see docs) | ❌ |
Sign in with ChatGPT
Theopenai_codex provider lets you use OpenAI’s Codex models with your paid ChatGPT subscription instead of an OPENAI_API_KEY. You sign in with your ChatGPT account, and it shows up as its own provider in both /auth and the /model switcher, separate from the API-key-based openai provider.
Start the sign-in
Run
/auth in any session and select openai_codex. Because ChatGPT signs you in through your browser, this starts a browser sign-in instead of asking for an API key.Authorize in your browser
Deep Agents Code opens your browser to the ChatGPT sign-in page. If it can’t open a browser (for example, over SSH), it also shows the sign-in URL on screen so you can copy it to a browser on another device.
/auth, select openai_codex, and choose to re-authenticate or sign out.
openai_codex is separate from openai. To use OpenAI models with a standard API key instead, use the regular openai provider (e.g. /model openai:gpt-5.5).Model routers and proxies
Model routers like OpenRouter and LiteLLM provide access to models from multiple providers through a single endpoint. Use the dedicated integration packages for these services:| Router | Package | Config |
|---|---|---|
| OpenRouter | langchain-openrouter | openrouter:<model> (built-in, see Provider reference) |
| LiteLLM | langchain-litellm | litellm:<model> (built-in, see Provider reference) |
Switch models
To switch models in Deep Agents Code, either:-
Use the interactive model switcher with the
/modelcommand.Not all models appear here. If yours is missing, pass the model name directly (e.g./model gpt-5.5) or add it toconfig.toml. -
Specify a model name directly as an argument, e.g.
/model gpt-5.5. You can use any model supported by the chosen provider, regardless of whether it appears in the list from option 1. The model name will be passed to the API request. -
Specify the model at launch via
--model, e.g.
Model resolution order
Model resolution order
When Deep Agents Code launches, it resolves which model to use in the following order:
--modelflag always wins when provided.[models].defaultin~/.deepagents/config.toml—the user’s intentional long-term preference.[models].recentin~/.deepagents/config.toml—the last model switched to via/model. Written automatically; never overwrites[models].default.- Environment auto-detection: falls back to the first available startup credential, checked in order:
OPENAI_API_KEY,ANTHROPIC_API_KEY,GOOGLE_API_KEY,GOOGLE_CLOUD_PROJECT(Vertex AI).
--model, /model, and saved defaults ([models].default / [models].recent).Which models appear in the switcher
The/model selector dynamically builds its list from installed provider packages. Expand below for the full criteria and troubleshooting.
How the switcher builds its model list
How the switcher builds its model list
The interactive
/model selector builds its list from installed provider packages and models configured in config.toml.A model appears when:- The provider package is installed.
- The model is available from the provider package, a local provider, or your
config.toml. - The model profile does not mark text input or output as unsupported.
/model <provider>:<model> directly or add it to [models.providers.<name>].models.Open weights models
If you want to use an open weights model, there are two common paths depending on whether you prefer local or cloud-hosted inference. Local inference with Ollama is the easiest way to get started for free, with no API key required:-
Install Ollama and pull a model, for example:
-
Install the Ollama extra:
-
Select the model:
Use the interactive switcher, or pass the model directly with
/model ollama:qwen3:4b.
- Get a free API key at console.groq.com.
-
Install the Groq extra:
-
Select a model:
Use the interactive switcher, or pass the model directly with
/model groq:openai/gpt-oss-120b.
/model fireworks:accounts/fireworks/models/deepseek-v4-pro.
Baseten is another cloud provider for open weights models:
/model baseten:moonshotai/Kimi-K2.6.
Together, OpenRouter, and Hugging Face (langchain-huggingface) are other options for cloud-hosted open weights. See the Provider reference for credentials and package names.
Set a default model
You can set a persistent default model that applies to all future CLI launches:-
Via model selector: Open
/model, navigate to the desired model, and pressCtrl+Sto pin it as the default. PressingCtrl+Sagain on the current default clears it. -
Via command:
/model --default provider:model(e.g.,/model --default anthropic:claude-opus-4-8) -
Via config file: Set
[models].defaultin~/.deepagents/config.toml(see Configuration). -
From the shell:
-
From the shell:
-
Via command:
/model --default --clear -
Via model selector: Press
Ctrl+Son the currently pinned default model.
Model parameters
Pass extra constructor kwargs to the model—sampling controls, reasoning/thinking budgets, context window sizes, request timeouts, and anything else the underlying chat-model class accepts. Three places to set them, in priority order (highest first):-
One-off at launch with
--model-params. JSON string, session-only: -
Mid-session via
/model --model-params. Same JSON syntax—swaps params (and optionally the model) without restarting: -
Persistent in
config.toml. Provider-level defaults (with optional per-model sub-tables) that apply on every launch:
params and are session-only (mid-session changes are not persisted). Per-model sub-tables in config.toml override provider-level keys (shallow merge—see Model constructor params for full semantics). --model-params cannot be combined with --default.
For retry counts, prefer --max-retries or the top-level [retries] config.
Don’t put credentials (
api_key) in params—use api_key_env to point at an environment variable instead.max_input_tokens, tool_calling, capability flags)—distinct from constructor params—see Profile overrides.
Advanced configuration
For detailed configuration of provider params, profile overrides, custom base URLs, compatible APIs, arbitrary providers, and lifecycle hooks, see Configuration.Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

