Skip to content

LLM model management

List available large language models (LLMs) and configure which one the DataRobot CLI uses by default.

Synopsis

dr llm-gateway <command> [flags]
dr llm <command> [flags]           # alias

Description

The llm-gateway command group exposes two subcommands:

  • list—fetch available LLMs from two sources and display them as a table or JSON: active LLM gateway catalog models (/api/v2/genai/llmgw/catalog/) and DataRobot-deployed LLMs (/api/v2/deployments/, deployments whose champion model is a text-generation model). A SOURCE column (or source field in JSON) distinguishes the two.
  • select—choose a default LLM, either by ID or through an interactive picker. The selection is persisted to drconfig.yaml and read by other CLI commands.

Each source is best-effort: if one source can't be reached (for example, an empty LLM gateway on an on-prem install, or no deployment access), the command logs a warning and lists the other. It errors only when both sources fail.

Aliases: llm, llm-gateways

Subcommands

list

Fetch available LLMs—LLM gateway catalog models and DataRobot-deployed LLMs—and display them.

dr llm-gateway list [flags]
dr llm ls                   # shortest alias

Flags:

Flag Description
--output-format json Emit machine-parseable JSON instead of a table.

Table columns:

Column Description
ID LLM identifier—a gateway model ID or a deployment ID. Prefixed with * if it's the current default, two spaces otherwise.
NAME Human-readable model name (a deployment's label for deployed LLMs).
SOURCE gateway for LLM gateway catalog models, deployed for DataRobot-deployed LLMs.
PROVIDER Model provider (for example azure, anthropic, google). - for deployed LLMs.
MODEL Underlying model identifier (for example azure/gpt-5-1-2025-11-13). - for deployed LLMs, since the deployment ID in ID is the routing key instead.
CONTEXT Context-window size in tokens. - when not reported (always - for deployed LLMs).

The table is sized to its content and capped at the terminal width to avoid overflow. description is long enough to wrap unreadably in a table, so it's included in JSON output only.

JSON output (--output-format json) returns an envelope with an llms array. Each entry includes:

{
  "id": "llm-abc123",
  "name": "GPT-4o",
  "source": "gateway",
  "provider": "azure",
  "model": "azure/gpt-5-1-2025-11-13",
  "description": "OpenAI's flagship multimodal model.",
  "context_size": 128000,
  "deployment_id": "",
  "selected": true
}

For a deployed LLM, source is deployed, deployment_id carries the deployment ID, and model is the internal routing sentinel datarobot/datarobot-deployed-llm.

Examples:

# Table view
dr llm-gateway list

# JSON output
dr llm-gateway list --output-format json

# Aliases
dr llm list
dr llm ls

select

Set the default LLM. The chosen ID—a gateway model ID or a deployment ID—is written to drconfig.yaml under the key default-llm-id and is also readable through DATAROBOT_CLI_DEFAULT_LLM_ID.

dr llm-gateway select [llm-id]
dr llm select [llm-id]      # alias

Arguments:

  • llm-id (optional)—an ID from the ID column of dr llm list. When provided, it's validated against the available LLMs (gateway models and deployed LLMs) and persisted immediately. When omitted, an interactive picker opens.

Interactive picker:

  • Arrow keys to navigate, / to filter by name.
  • Enter to confirm the selection.
  • Ctrl+C or Esc to cancel without saving.

Examples:

# Interactive picker
dr llm-gateway select

# Set directly by ID
dr llm-gateway select llm-abc123

# Error: ID not found among available LLMs
dr llm-gateway select unknown-id
# Error: LLM "unknown-id" not found

Global flags

All dr global flags apply to dr llm-gateway subcommands:

  • -v, --verbose — Verbose output
  • --debug — Debug output
  • --skip-auth — Skip authentication checks (advanced; API calls may fail)
  • -h, --help — Help

Configuration

The selected LLM ID is stored in drconfig.yaml. It's a gateway model ID or a DataRobot deployment ID, depending on which was selected:

default-llm-id: llm-abc123

It can also be set or overridden with an environment variable:

export DATAROBOT_CLI_DEFAULT_LLM_ID=llm-abc123

dr llm-gateway list uses this value to mark the current default with * in the ID column.

Authentication

Both subcommands require valid DataRobot credentials. Run dr auth login first if you haven't already.