Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to main content
Deep Agents Code supports any chat model provider compatible with LangChain, unlocking use for virtually any LLM that supports tool calling. Any service that exposes an OpenAI-compatible or Anthropic-compatible API also works out of the box—see Compatible APIs.

Quickstart

Deep Agents Code integrates automatically with the following model providers: no extra configuration needed beyond installing the relevant provider package.
  1. 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 with dcode --install:
    /install groq
    
    Run /install with no argument to list the valid extras. To preinstall extras during the initial CLI install, set DEEPAGENTS_CODE_EXTRAS:
    DEEPAGENTS_CODE_EXTRAS="baseten,groq" curl -LsSf https://langch.in/dcode | bash
    
  2. Set credentials Add an API key for your provider with the /auth credential manager:
    /auth
    
    For non-interactive runs, CI/CD, or anywhere a TUI isn’t available, store the same key from the shell with dcode auth set or set the provider’s environment variable instead. See Provider credentials for the full key resolution order, the DEEPAGENTS_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.
ProviderPackageCredential env varModel profiles
OpenAIlangchain-openaiOPENAI_API_KEY
OpenAI (Codex)langchain-openaiNone — sign in with ChatGPT
Azure OpenAIlangchain-openaiAZURE_OPENAI_API_KEY
Anthropiclangchain-anthropicANTHROPIC_API_KEY
Google Gemini APIlangchain-google-genaiGOOGLE_API_KEY
Google Vertex AIlangchain-google-genaiGOOGLE_CLOUD_PROJECT
Basetenlangchain-basetenBASETEN_API_KEY
AWS Bedrocklangchain-awsAWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
AWS Bedrock Converselangchain-awsAWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
Hugging Facelangchain-huggingfaceHUGGINGFACEHUB_API_TOKEN
Ollamalangchain-ollamaOLLAMA_API_KEY (cloud only; optional)
Groqlangchain-groqGROQ_API_KEY
Coherelangchain-cohereCOHERE_API_KEY
Fireworkslangchain-fireworksFIREWORKS_API_KEY
Togetherlangchain-togetherTOGETHER_API_KEY
Mistral AIlangchain-mistralaiMISTRAL_API_KEY
DeepSeeklangchain-deepseekDEEPSEEK_API_KEY
IBM (watsonx.ai)langchain-ibmWATSONX_APIKEY
Nvidialangchain-nvidia-ai-endpointsNVIDIA_API_KEY
xAIlangchain-xaiXAI_API_KEY
Perplexitylangchain-perplexityPERPLEXITY_API_KEY (or PPLX_API_KEY)
OpenRouterlangchain-openrouterOPENROUTER_API_KEY
LiteLLMlangchain-litellmPer-provider (see docs)
You can scope any credential to Deep Agents Code by adding a DEEPAGENTS_CODE_ prefix. For example, DEEPAGENTS_CODE_OPENAI_API_KEY takes priority over OPENAI_API_KEY within Deep Agents Code without affecting other tools. See DEEPAGENTS_CODE_ prefix for details.
Model profiles provide model metadata used by the interactive /model switcher. If a model is missing from the switcher, pass the model name directly or add it via config.toml.

Sign in with ChatGPT

The openai_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.
1

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.
2

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.
3

Select a Codex model

Once signed in, the Codex models appear in the /model switcher under the openai_codex provider. Switch to one directly with its spec:
/model openai_codex:gpt-5.5
Your sign-in persists across sessions. To check your status or sign out, run /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:
RouterPackageConfig
OpenRouterlangchain-openrouteropenrouter:<model> (built-in, see Provider reference)
LiteLLMlangchain-litellmlitellm:<model> (built-in, see Provider reference)
OpenRouter is a built-in provider—install the extra and use it directly:
/install openrouter
LiteLLM is also a built-in provider:
/install litellm

Switch models

To switch models in Deep Agents Code, either:
  1. Use the interactive model switcher with the /model command.
    Not all models appear here. If yours is missing, pass the model name directly (e.g. /model gpt-5.5) or add it to config.toml.
  2. 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.
  3. Specify the model at launch via --model, e.g.
    dcode --model openai:gpt-5.5
    
When Deep Agents Code launches, it resolves which model to use in the following order:
  1. --model flag always wins when provided.
  2. [models].default in ~/.deepagents/config.toml—the user’s intentional long-term preference.
  3. [models].recent in ~/.deepagents/config.toml—the last model switched to via /model. Written automatically; never overwrites [models].default.
  4. 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).
This startup fallback intentionally checks only those four credentials. Other supported providers (for example, Groq) are still available via --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.
The interactive /model selector builds its list from installed provider packages and models configured in config.toml.A model appears when:
  1. The provider package is installed.
  2. The model is available from the provider package, a local provider, or your config.toml.
  3. The model profile does not mark text input or output as unsupported.
If a model is missing, use /model <provider>:<model> directly or add it to [models.providers.<name>].models.
Credential status does not affect whether a model is listed. You can still select a model with missing credentials. The provider reports an authentication error at request time.

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:
  1. Install Ollama and pull a model, for example:
    ollama pull qwen3:4b
    
  2. Install the Ollama extra:
    /install ollama
    
  3. Select the model:
    /model
    
    Use the interactive switcher, or pass the model directly with /model ollama:qwen3:4b.
Cloud-hosted open weights via Groq gives you fast inference without running anything locally:
  1. Get a free API key at console.groq.com.
  2. Install the Groq extra:
    /install groq
    
  3. Select a model:
    /model
    
    Use the interactive switcher, or pass the model directly with /model groq:openai/gpt-oss-120b.
Fireworks is another popular cloud provider for open weights models:
/install fireworks
/model
Use the interactive switcher, or pass the model directly with /model fireworks:accounts/fireworks/models/deepseek-v4-pro. Baseten is another cloud provider for open weights models:
/install baseten
/model
Use the interactive switcher, or pass the model directly with /model baseten:moonshotai/Kimi-K2.6.
If you want a provider preinstalled at the same time as the CLI itself, use DEEPAGENTS_CODE_EXTRAS during the initial install:
DEEPAGENTS_CODE_EXTRAS="fireworks" curl -LsSf https://langch.in/dcode | bash
You can combine multiple providers: DEEPAGENTS_CODE_EXTRAS="groq,fireworks,ollama". If Deep Agents Code is already installed, use /install <extra> in a session or dcode --install <extra> from the shell instead.
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 press Ctrl+S to pin it as the default. Pressing Ctrl+S again 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].default in ~/.deepagents/config.toml (see Configuration).
  • From the shell:
    dcode --default-model anthropic:claude-opus-4-8
    
To view the current default:
dcode --default-model
To clear the default:
  • From the shell:
    dcode --clear-default-model
    
  • Via command: /model --default --clear
  • Via model selector: Press Ctrl+S on the currently pinned default model.
Without a default, Deep Agents Code uses the most recently used 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):
  1. One-off at launch with --model-params. JSON string, session-only:
    # OpenAI reasoning effort
    dcode --model openai:gpt-5.5 --model-params '{"reasoning": {"effort": "high"}}'
    
    # Anthropic extended thinking
    dcode --model anthropic:claude-opus-4-8 --model-params '{"thinking": {"type": "enabled", "budget_tokens": 10000}, "max_tokens": 16000}'
    
  2. Mid-session via /model --model-params. Same JSON syntax—swaps params (and optionally the model) without restarting:
    /model --model-params '{"temperature": 0.7}' anthropic:claude-opus-4-8
    /model --model-params '{"num_ctx": 16384}'           # opens selector, applies params to choice
    
  3. Persistent in config.toml. Provider-level defaults (with optional per-model sub-tables) that apply on every launch:
    [models.providers.anthropic.params]
    thinking = { type = "enabled", budget_tokens = 10000 }
    max_tokens = 16000
    
    [models.providers.openai.params]
    reasoning = { effort = "high", summary = "auto" }
    output_version = "responses/v1"
    
    [models.providers.ollama.params]
    num_ctx = 16384
    temperature = 0
    
    # Per-model override—wins over provider-level keys
    [models.providers.ollama.params."qwen3:4b"]
    temperature = 0.5
    
CLI flags override config-file 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.
Any kwarg accepted by the underlying chat-model constructor is valid. Refer to the provider’s reference docs for the full list—e.g. ChatAnthropic, ChatOpenAI, ChatOllama. Unknown kwargs are forwarded to the upstream API request, so newly released parameters work without a CLI update.
Don’t put credentials (api_key) in params—use api_key_env to point at an environment variable instead.
To override fields on the model’s runtime profile (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.