# LLM model management

> LLM model management - List LLM Gateway models and DataRobot-deployed LLMs, and set the CLI's
> default LLM.

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-08-05T06:11:28.825947+00:00` (UTC).

## Primary page

- [LLM model management](https://docs.datarobot.com/ja/docs/agentic-ai/cli/commands/llm-gateway.html.md): Full documentation for this topic (Markdown sidecar).

## Sections on this page

- [Synopsis](https://docs.datarobot.com/ja/docs/agentic-ai/cli/commands/llm-gateway.html.md#synopsis): In-page section heading.
- [説明](https://docs.datarobot.com/ja/docs/agentic-ai/cli/commands/llm-gateway.html.md#description): In-page section heading.
- [Subcommands](https://docs.datarobot.com/ja/docs/agentic-ai/cli/commands/llm-gateway.html.md#subcommands): In-page section heading.
- [list](https://docs.datarobot.com/ja/docs/agentic-ai/cli/commands/llm-gateway.html.md#list): In-page section heading.
- [select](https://docs.datarobot.com/ja/docs/agentic-ai/cli/commands/llm-gateway.html.md#select): In-page section heading.
- [Global flags](https://docs.datarobot.com/ja/docs/agentic-ai/cli/commands/llm-gateway.html.md#global-flags): In-page section heading.
- [設定](https://docs.datarobot.com/ja/docs/agentic-ai/cli/commands/llm-gateway.html.md#configuration): In-page section heading.
- [認証](https://docs.datarobot.com/ja/docs/agentic-ai/cli/commands/llm-gateway.html.md#authentication): In-page section heading.

## Documentation content

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 
```

## 説明

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 | 説明 |
| --- | --- |
| --output-format json | Emit machine-parseable JSON instead of a table. |

Table columns:

| 列 | 説明 |
| --- | --- |
| 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`.

例：

```
# 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.

例：

```
# 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](https://docs.datarobot.com/ja/docs/agentic-ai/cli/commands/index.html.md#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

## 設定

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.

## 認証

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