dr llm-gateway — LLM model management
List available LLMs — both LLM Gateway catalog models and DataRobot-deployed LLMs — and configure which one the CLI uses by default.
Synopsis
Description
The dr llm-gateway 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 aTextGenerationmodel). ASOURCEcolumn /sourcefield distinguishes the two.--sourcenarrows it to one.select— choose a default LLM, either by ID or through an interactive TUI picker. The selection is persisted todrconfig.yamland read by other CLI commands.
When both sources are queried (select, and list without --source), each is best-effort: if one cannot be reached (e.g. an empty LLM Gateway on-prem, or no deployment access), the command logs a warning and lists the other, and errors only when both fail. The two are fetched in parallel, so the command waits on the slower source rather than on both in turn. Asking list for a single source instead makes a failure to reach it an error, since there is no other source left to show.
Aliases: llm, llm-gateways
Subcommands
list
Fetch available LLMs — LLM Gateway catalog models and DataRobot-deployed LLMs — and display them.
Flags:
--output-format <json>— emit machine-parseable JSON instead of a table.--source <all|gateway|deployed>— which sources to query. Defaults toall.gatewayanddeployedskip the request the other source would have made, so a script that needs one source does not wait on both. The values are the same strings theSOURCEcolumn and the JSONsourcefield carry. A single source that cannot be reached is an error rather than an empty list.
Output columns (table):
| Column | Description |
|---|---|
ID |
LLM identifier — a gateway model id or a deployment id. Prefixed with * if selected, 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 |
Provider (e.g. azure, anthropic, google). - for deployed LLMs. |
MODEL |
Underlying model identifier. - for deployed LLMs (the deployment id in ID is the routing key). |
CONTEXT |
Context-window size in tokens. - when not reported (always - for deployed LLMs). |
The table width is content-driven and capped at the terminal width to prevent overflow. description is omitted from the table (it is long enough to wrap unreadably across a full catalog) and appears in JSON output only.
JSON output (--output-format json) returns an envelope with a llms array. Each entry includes:
{
"id": "llm-abc123",
"name": "GPT-4o",
"source": "gateway",
"provider": "azure",
"model": "gpt-4o",
"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 litellm sentinel datarobot/datarobot-deployed-llm.
Examples:
# Table view
dr llm-gateway list
# JSON output
dr llm-gateway list --output-format json
# One source only. Skips the request the other source would have made.
dr llm-gateway list --source gateway
dr llm-gateway list --source deployed --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 via DATAROBOT_CLI_DEFAULT_LLM_ID.
Arguments:
[llm-id]— optional. When provided, the ID is validated against the available LLMs (gateway models and deployed LLMs) and persisted immediately. When omitted, an interactive TUI picker is launched.
Interactive picker:
- Arrow keys to navigate,
/to filter by name. Enterto confirm selection.Ctrl-CorEscto cancel without saving.
Examples:
# Interactive TUI 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
Configuration
The selected LLM ID is stored in drconfig.yaml. This is a gateway model id or a DataRobot deployment id, depending on which was selected:
It can also be set or overridden via the environment variable:
The dr llm-gateway list output uses this value to mark the currently selected model with *.
Authentication
Both subcommands require valid DataRobot credentials. Run dr auth login first if you haven't already.
See also
- auth — authenticate with DataRobot.
- Command reference — overview of all commands.