Skip to main content
Version: 0.0.41

Manage Models

This guide covers the custom model lifecycle via CLI: list available models, create a custom model, configure defaults, and export or import model definitions.

List Models​

lhc models list

Filter by type:

lhc models list --type chat
lhc models list --type embedding

Get a Model​

lhc models get <model-id>

Create a Custom Model​

A custom model combines a provider base model with your datasources. To create one:

lhc models create \
--id my-sales-model \
--name "Sales Assistant" \
--base-model-id azure-chat-azure-openai-chat-dev \
--type chat
FlagRequiredDescription
--idyesUnique model identifier (no spaces)
--nameyesDisplay name shown in the UI
--base-model-idyesID of the provider base model to use
--typenoModel type: chat (default), embedding, text-to-speech, speech-to-text

To find available base model IDs:

lhc models list --output json

Update a Model​

Rename a custom model:

lhc models update <model-id> --name "Sales Assistant v2"

Delete a Model​

lhc models delete <model-id>

Set Default Model​

Mark a model as the default for its type. This controls which model is pre-selected in new sessions:

lhc models set-default <model-id> --type chat

Valid --type values: chat, embedding, text-to-speech, speech-to-text.

Export a Model​

Export a custom model definition to a portable .lhc.json file. The export includes all embedded datasource references:

# Print to stdout
lhc models export <model-id>

# Write to file
lhc models export <model-id> -f model.lhc.json

Import a Model​

lhc models import model.lhc.json

If a model with the same name or ID already exists, the import is aborted:

Error: HTTP 409: {"detail": "... already exists"}

A model with this name or ID already exists.
Option A: delete it first: lhc models delete <model-id>
Option B: import with a different name: lhc models import <file> --name <new-name>

To import under a different name:

lhc models import model.lhc.json --name "Sales Assistant (Staging)"

Embedded datasources in the export file are automatically created during import with a _imported name suffix.

Migration Example​

Export a model from one instance and import it into another:

# Export from production
lhc --profile prod models export my-sales-model -f sales-model.lhc.json

# Import into staging
lhc --profile staging models import sales-model.lhc.json --name "Sales Model (from prod)"