# uip llm-configuration

> Syntax and options for `uip llm-configuration byo-connections`, which manages Bring-Your-Own LLM product configurations in the UiPath AI Trust Layer / LLM Gateway.

`uip llm-configuration` manages **Bring-Your-Own LLM (BYO LLM)** product configurations in the UiPath AI Trust Layer — pointing a UiPath feature (an agent, a Studio Web product surface, an AI-powered activity) at a customer-owned model instead of a UiPath-hosted one. The tool ships as the `@uipath/llmgw-tool` package; every command is invoked as `uip llm-configuration byo-connections <verb>`.

## Concepts

- **Product / feature.** Every configuration is scoped to a `(product, operationGroupName)` pair — for example `product=agents`, `feature=agents-design-eval-deploy`. Discover valid pairs and their model rules with [`list-product-configs`](#uip-llm-configuration-byo-connections-list-product-configs) before creating anything.
- **Wrapper and inner configurations.** One configuration record (the "wrapper") holds one or more inner LLM configurations, each mapping a UiPath catalog model to a customer-owned model reachable through an [Integration Service connection](./uip-is-connections.md).
- **Two authoring shapes for `create`/`update`** — mutually exclusive:
  - **Single-mapping shorthand** — top-level flags (`--llm-name`, `--connector-type`, `--connection-id`, `--api-flavor`, `--llm-identifier`). Use for `AnyModel` and `AnyModelWithOwnAdditions` features, which need only one inner mapping.
  - **Multi-mapping form** — repeatable `--mapping 'llm-name=…,llm-identifier=…,connector-type=…,api-flavor=…,connection-id=…'`. Required for `AllModels` features, which need one mapping per catalog model in `models[]` (a catalog model can be satisfied by one of its `alternativesWithProbes` entries, or by a generic alternative when the feature defines `genericAlternativeProbes`).
- **Field name translation** — the CLI's flag names differ from the wire payload and from the Studio Web portal's field labels:

  | Portal label | CLI flag | Wire field |
  |---|---|---|
  | Product | `--product` | `product` |
  | Feature | `--feature` | `operationGroupName` |
  | Connections Folder | `--folder-key` | `folderId` |
  | Connector | `--connector-type` (or `--mapping connector-type=…`) | `connectorType` |
  | Connection | `--connection-id` (or `--mapping connection-id=…`) | `connectionId` |
  | LLM Name | `--llm-name` (or `--mapping llm-name=…`) | `desiredModel` |
  | API Type | `--api-flavor` (or `--mapping api-flavor=…`) | `apiFlavor` |
  | LLM identifier | `--llm-identifier` (or `--mapping llm-identifier=…`) | `customerModel` |

- **Server-side validation always runs.** `create` and `update` both run a client-side preflight check against the gateway's live vendor/api-flavor catalogs (rejecting an unsupported `--connector-type`/`--api-flavor` combination before any network write), then a server-side probe call that actually exercises the connection with the given model. There is no flag to skip either check — a probe failure (unhealthy connection, a `--llm-identifier` the vendor account doesn't expose) aborts the write with the probe's `reason` and, when available, a `summary` object.
- **`update` replaces the whole wrapper.** It fetches the existing record only to recover the locked `product`/`operationGroupName`/`folderId`/`name` identity fields, then PUTs a freshly-built body — every model mapping you want must be re-supplied in the `update` call itself; nothing carries over implicitly. `--product`/`--feature` can't be changed on an existing configuration — delete and re-create to move one to a different product/feature.
- **`--login-validity <minutes>`** is available on every verb to override the interactive-login token lifetime for that one call.

## Synopsis

```text
uip llm-configuration byo-connections list [--include-connection-details]
uip llm-configuration byo-connections get <configuration-id> [--force-refresh]
uip llm-configuration byo-connections create --product <name> --feature <name> --folder-key <uuid> [--mapping <kv>]... | [--connector-type <type> --connection-id <uuid> --llm-name <model> --api-flavor <flavor> --llm-identifier <model>] [--name <name>] [--enabled | --no-enabled]
uip llm-configuration byo-connections update <configuration-id> [--mapping <kv>]... | [--connector-type <type> --connection-id <uuid> --llm-name <model> --api-flavor <flavor> --llm-identifier <model>] [--folder-key <uuid>] [--name <name>] [--enabled | --no-enabled]
uip llm-configuration byo-connections delete <configuration-id> --force
uip llm-configuration byo-connections list-product-configs [--product <name>] [--feature <name>] [--models-only]
```

Every verb also accepts `--login-validity <minutes>`.

## uip llm-configuration byo-connections list

List all BYO LLM product configurations registered for the current tenant.

### Options

| Long | Value | Default | Description |
|---|---|---|---|
| `--include-connection-details` | flag | off | Resolve and include connection metadata. Slower — makes an extra call to Integration Service per connection. |

### Example

```bash
uip llm-configuration byo-connections list
```

### Data shape (--output json)

```json
{
  "Code": "AiByoConnectionsList",
  "Data": [
    {
      "id": "e5723bb8-fbc2-4317-c7d7-08de803bc010",
      "folderId": "117fc0a5-d840-4601-9659-a5963a39ff81",
      "name": "agenthub-llm-call-1777293840315",
      "product": "agenthub",
      "operationGroupName": "agenthub-llm-call",
      "enabled": true,
      "llmConfigurations": [
        {
          "id": "e4e4aab5-2bf4-403e-bbf0-08de803bc012",
          "connectorType": "AmazonWebServices",
          "apiFlavor": "AwsBedrockInvoke",
          "configurationType": "SelfServe",
          "connectionId": "18fb337c-29b7-4162-a9e8-0c05b01cf4df",
          "desiredModel": "anthropic.claude-sonnet-4-20250514-v1:0",
          "customerModel": "eu.anthropic.claude-sonnet-4-20250514-v1:0",
          "connectedModel": "eu.anthropic.claude-sonnet-4-20250514-v1:0",
          "validConnection": true
        }
      ]
    }
  ]
}
```

Response keys are kept in their native camelCase, not PascalCased — this payload round-trips directly into `create`/`update`-style tooling. `validConnection` reflects the last-known health of the inner connection; pass `--include-connection-details` to force a fresh resolve.

## uip llm-configuration byo-connections get

Fetch a single BYO product configuration by ID.

### Arguments

| Name | Required | Purpose |
|---|---|---|
| `<configuration-id>` | yes | BYO product configuration UUID. Obtain from `byo-connections list`. |

### Options

| Long | Value | Default | Description |
|---|---|---|---|
| `--force-refresh` | flag | off | Bypass cached connection details and re-resolve them from Integration Service. |

### Example

```bash
uip llm-configuration byo-connections get e5723bb8-fbc2-4317-c7d7-08de803bc010
```

### Data shape (--output json)

```json
{
  "Code": "AiByoConnectionsGet",
  "Data": {
    "id": "e5723bb8-fbc2-4317-c7d7-08de803bc010",
    "folderId": "117fc0a5-d840-4601-9659-a5963a39ff81",
    "name": "agenthub-llm-call-1777293840315",
    "product": "agenthub",
    "operationGroupName": "agenthub-llm-call",
    "enabled": true,
    "llmConfigurations": [
      {
        "id": "e4e4aab5-2bf4-403e-bbf0-08de803bc012",
        "connectorType": "AmazonWebServices",
        "apiFlavor": "AwsBedrockInvoke",
        "configurationType": "SelfServe",
        "connectionId": "18fb337c-29b7-4162-a9e8-0c05b01cf4df",
        "desiredModel": "anthropic.claude-sonnet-4-20250514-v1:0",
        "customerModel": "eu.anthropic.claude-sonnet-4-20250514-v1:0",
        "connectedModel": "eu.anthropic.claude-sonnet-4-20250514-v1:0",
        "validConnection": true
      }
    ]
  }
}
```

## uip llm-configuration byo-connections create

Create a new BYO LLM product configuration from CLI flags — no JSON file required.

### Options

| Long | Value | Required | Description |
|---|---|---|---|
| `--product <name>` | string | **yes** | Product code, e.g. `agents`, `agenthub`. Discover with `list-product-configs`. |
| `--feature <name>` | string | **yes** | Operation group name within the product (e.g. `agents-design-eval-deploy`). |
| `--folder-key <uuid>` | UUID | **yes** | Connections folder UUID. Discover with `uip or folders list`. |
| `--mapping <kv>` | comma-separated `key=value`, repeatable | conditionally | Per-model mapping. Required keys: `llm-name`, `llm-identifier`, `connector-type`, `api-flavor`, `connection-id`. Optional: `default-model`. Required (one per catalog model) for `AllModels` features; mutually exclusive with the single-mapping shorthand flags below. |
| `--connector-type <type>` | one of `OpenAi`, `AzureOpenAi`, `AwsBedrock`, `AmazonWebServices`, `GoogleVertex`, `OpenAiV1Compatible`, `Custom` | single-mapping shorthand | Vendor connector. |
| `--connection-id <uuid>` | UUID | single-mapping shorthand | Integration Service connection holding vendor credentials. |
| `--llm-name <model>` | string | single-mapping shorthand | UiPath catalog model name being replaced (wire: `desiredModel`). |
| `--api-flavor <flavor>` | one of `OpenAiChatCompletions`, `OpenAiResponses`, `OpenAiEmbeddings`, `GeminiGenerateContent`, `GeminiEmbeddings`, `AwsBedrockInvoke`, `AwsBedrockConverse`, `AnthropicMessages` | single-mapping shorthand | API type. |
| `--llm-identifier <model>` | string | single-mapping shorthand | Customer's vendor-side model alias — the model the gateway actually routes to (wire: `customerModel`). |
| `--default-model <model>` | string | no | Primary model for an operation group with alternatives. Defaults to `--llm-name`. |
| `--name <name>` | string | no | Override the auto-generated wrapper name. Default: `<feature>-<unix-millis>`. |
| `--enabled` / `--no-enabled` | flag | no | Enable (default) or save disabled. |

The single-mapping shorthand and `--mapping` are mutually exclusive on one invocation — passing both, or an incomplete `--mapping` (missing one of the five required keys), fails before any network call, naming the offending flag.

### Examples

```bash
# Single-mapping form (typical for AnyModelWithOwnAdditions features)
uip llm-configuration byo-connections create \
  --product agenthub --feature agenthub-llm-call \
  --folder-key 117fc0a5-d840-4601-9659-a5963a39ff81 \
  --connector-type AmazonWebServices \
  --connection-id 18fb337c-29b7-4162-a9e8-0c05b01cf4df \
  --llm-name anthropic.claude-sonnet-4-20250514-v1:0 \
  --api-flavor AwsBedrockInvoke \
  --llm-identifier eu.anthropic.claude-sonnet-4-20250514-v1:0
```

```bash
# Multi-mapping form for an AllModels feature — one --mapping per catalog model
uip llm-configuration byo-connections create \
  --product uipath-ecs --feature uipath-ecs-batch-transform-web-search \
  --folder-key f73c21e7-f36e-4833-94c1-9446a04b02e4 \
  --mapping 'llm-name=gemini-2.5-flash,llm-identifier=gemini-2.5-flash,connector-type=GoogleVertex,api-flavor=GeminiGenerateContent,connection-id=6d33e3b5-5480-4435-9bc5-ef0ea785bda5' \
  --mapping 'llm-name=gemini-2.5-flash-lite,llm-identifier=gemini-2.5-flash,connector-type=GoogleVertex,api-flavor=GeminiGenerateContent,connection-id=6d33e3b5-5480-4435-9bc5-ef0ea785bda5'
```

### Data shape (--output json)

```json
{
  "Code": "AiByoConnectionsCreated",
  "Data": {
    "configuration": {
      "id": "e5723bb8-fbc2-4317-c7d7-08de803bc010",
      "name": "agenthub-llm-call-1777293840315",
      "product": "agenthub",
      "operationGroupName": "agenthub-llm-call",
      "enabled": true
    },
    "validation": {
      "anthropic.claude-sonnet-4-20250514-v1:0": {
        "isAvailable": true,
        "isCompatible": true,
        "isModelNameSimilar": true
      }
    }
  }
}
```

`validation` carries one entry per model probed during the pre-save check — `isModelNameSimilar: false` is a warning sign worth checking manually (the vendor-side model responded, but its name doesn't closely match what you specified).

### Failure: preflight and probe errors

If `--connector-type`/`--api-flavor` isn't a combination the gateway's catalogs allow, the command fails immediately with the offending flag named — no network write happens. If the combination is valid but the live probe against the connection fails (unhealthy connection, a `--llm-identifier` the vendor account doesn't actually expose), the command fails with the probe's `reason` and — when the gateway returns one — a `summary` object, and points you at `uip is connections list` and `byo-connections list-product-configs --models-only` to diagnose.

## uip llm-configuration byo-connections update

Update an existing BYO product configuration in place. PUTs the whole wrapper from scratch — every model mapping must be re-supplied; nothing is merged from the existing record except the locked identity fields.

### Arguments

| Name | Required | Purpose |
|---|---|---|
| `<configuration-id>` | yes | BYO product configuration UUID. |

### Options

Same mapping options as `create` (`--mapping`, or the single-mapping shorthand `--connector-type`/`--connection-id`/`--llm-name`/`--api-flavor`/`--llm-identifier`/`--default-model`), plus:

| Long | Value | Description |
|---|---|---|
| `--folder-key <uuid>` | UUID | Override the folder. Defaults to the existing record's folder. |
| `--name <name>` | string | Override the wrapper name. Defaults to the existing record's name. |
| `--enabled` / `--no-enabled` | flag | Enable or disable the configuration. |

`--product`/`--feature` cannot be passed here — a configuration's identity is fixed at creation. Delete and re-create to move it to a different product/feature.

### Examples

```bash
# Replace the model on an existing single-mapping configuration
uip llm-configuration byo-connections update e5723bb8-fbc2-4317-c7d7-08de803bc010 \
  --llm-name anthropic.claude-sonnet-4-20250514-v1:0 \
  --llm-identifier eu.anthropic.claude-sonnet-4-20250514-v1:0 \
  --connector-type AmazonWebServices --api-flavor AwsBedrockInvoke \
  --connection-id 18fb337c-29b7-4162-a9e8-0c05b01cf4df
```

```bash
# Update a multi-mapping AllModels configuration
uip llm-configuration byo-connections update e5723bb8-fbc2-4317-c7d7-08de803bc010 \
  --mapping 'llm-name=gemini-2.5-flash,llm-identifier=gemini-2.5-flash,connector-type=GoogleVertex,api-flavor=GeminiGenerateContent,connection-id=6d33e3b5-5480-4435-9bc5-ef0ea785bda5' \
  --mapping 'llm-name=gemini-2.5-flash-lite,llm-identifier=gemini-2.5-flash,connector-type=GoogleVertex,api-flavor=GeminiGenerateContent,connection-id=6d33e3b5-5480-4435-9bc5-ef0ea785bda5'
```

### Data shape (--output json)

```json
{
  "Code": "AiByoConnectionsUpdated",
  "Data": {
    "configuration": { "id": "e5723bb8-fbc2-4317-c7d7-08de803bc010" },
    "validation": {
      "anthropic.claude-sonnet-4-20250514-v1:0": {
        "isAvailable": true,
        "isCompatible": true,
        "isModelNameSimilar": true
      }
    }
  }
}
```

Same preflight/probe validation as `create` runs before the write — see [Failure: preflight and probe errors](#failure-preflight-and-probe-errors) above.

## uip llm-configuration byo-connections delete

Permanently delete a BYO product configuration.

### Arguments

| Name | Required | Purpose |
|---|---|---|
| `<configuration-id>` | yes | BYO product configuration UUID. |

### Options

| Long | Value | Required | Description |
|---|---|---|---|
| `--force` | flag | **yes** | Skip the confirmation. Deletion is permanent — omitting `--force` fails with an explicit refusal, no network call made. |

### Example

```bash
uip llm-configuration byo-connections delete e5723bb8-fbc2-4317-c7d7-08de803bc010 --force
```

### Data shape (--output json)

```json
{
  "Code": "AiByoConnectionsDeleted",
  "Data": { "id": "e5723bb8-fbc2-4317-c7d7-08de803bc010" }
}
```

## uip llm-configuration byo-connections list-product-configs

List the products and operation groups (features) that support BYO LLM configuration, with the per-model connector/api-flavor rules `create`/`update` need.

### Options

| Long | Value | Description |
|---|---|---|
| `--product <name>` | string | Filter to one product code (exact match, case-sensitive). |
| `--feature <name>` | string | Filter to one operation group within `--product` (exact match). Requires `--product` — passing `--feature` alone fails before any request. |
| `--models-only` | flag | Strip per-model `allowedApiFlavors`/`allowedConnectors` (and the same fields on `alternativesWithProbes` entries) — useful when you just want the model list. `addYourOwn` and the synthetic generic-alternative entry keep their fields regardless. |

### Examples

```bash
uip llm-configuration byo-connections list-product-configs \
  --product agents --feature agents-design-eval-deploy
```

```bash
uip llm-configuration byo-connections list-product-configs --models-only
```

### Data shape (--output json)

```json
{
  "Code": "AiByoProductConfigs",
  "Data": [
    {
      "product": "agents",
      "feature": "agents-design-eval-deploy",
      "modelsConfigurationOption": "AnyModelWithOwnAdditions",
      "addYourOwn": {
        "OpenAi": ["OpenAiResponses", "OpenAiChatCompletions"],
        "AmazonWebServices": ["AwsBedrockInvoke", "AwsBedrockConverse"],
        "Custom": ["OpenAiResponses", "OpenAiChatCompletions", "AwsBedrockInvoke", "AwsBedrockConverse", "AnthropicMessages", "GeminiGenerateContent"]
      },
      "models": [
        {
          "model": "gpt-4o-2024-11-20",
          "allowedApiFlavors": ["OpenAiResponses", "OpenAiChatCompletions"],
          "allowedConnectors": ["OpenAi", "AzureOpenAi", "OpenAiV1Compatible", "NvidiaNim", "Custom"]
        },
        {
          "model": "anthropic.claude-sonnet-4-20250514-v1:0",
          "allowedApiFlavors": ["AwsBedrockInvoke", "AwsBedrockConverse", "AnthropicMessages"],
          "allowedConnectors": ["AmazonWebServices", "Custom"],
          "customConnectorOnlyApiFlavors": ["OpenAiChatCompletions"]
        }
      ]
    }
  ]
}
```

`modelsConfigurationOption` is one of `AnyModel`, `AnyModelWithOwnAdditions`, or `AllModels` — it determines whether `create`/`update` needs the single-mapping shorthand or the multi-mapping `--mapping` form (see [Concepts](#concepts)). `addYourOwn` appears only on `AnyModelWithOwnAdditions` features, mapping each usable connector to the api-flavors valid for a customer-added model not already in `models[]`. `customConnectorOnlyApiFlavors` on a model or alternative means that api-flavor is reachable only via a `Custom` connector for that specific model — its native vendor catalog doesn't support it directly. `AllModels` features nest per-primary alternatives under `alternatives`, each carrying the same primary's probe set.

## Related

- [`uip is connections`](./uip-is-connections.md) — the Integration Service connections a BYO configuration's `--connection-id` points at.
- [`uip or folders`](./uip-or-folders.md) — find `--folder-key` values.

## See also

- [Global options](./global-options.md)
- [Exit codes](./exit-codes.md)
