Skip to content

Provider & Model Commands ​

The provider and model commands manage providers and models from your crushrc. Entity commands use add to create or update something and remove (or rm) to delete it. Booleans accept true/false/1/0/yes/no, in any case.

provider ​

Manage model providers.

text
Usage:
  provider [command]

Available Commands:
  add       Add or update a provider
  remove    Remove a provider and its custom models
  rm        Alias for remove

provider add ​

Add a provider, or update an existing provider with the same ID.

text
Usage:
  provider add <id> [flags]

Flags:
      --name string                 display name
      --type string                 provider type (openai, openai-compat, anthropic, ollama, …)
      --api-key string              API key
      --base-url string             API base URL
      --disable bool                disable without removing
      --flat-rate bool              use flat-rate billing
      --discover-models bool        auto-discover and merge provider models
      --system-prompt-prefix string text prepended to the system prompt
      --extra-header key value      add an HTTP header (repeatable)
      --extra-body JSON             merge a JSON object into request bodies
      --provider-options JSON       merge a provider-specific JSON object
bash
provider add deepseek \
  --type openai-compat \
  --base-url "https://api.deepseek.com/v1" \
  --api-key "${DEEPSEEK_API_KEY:?set DEEPSEEK_API_KEY}"

Headers whose value resolves to the empty string (an unset $VAR, a $(...) that prints nothing, or a literal "") are dropped from the outgoing request. This makes env-gated headers safe:

bash
provider add openai \
  --extra-header OpenAI-Organization "$OPENAI_ORG_ID"

If OPENAI_ORG_ID is unset, the header is simply not sent.

provider remove ​

Remove a provider and all custom models registered on it.

text
Usage:
  provider remove <id>
  provider rm <id>

model ​

Manage custom models and the large/small model slots. Model references use the same <provider>/<id> form printed by crush models.

text
Usage:
  model [command]

Available Commands:
  add       Register a custom model on an existing provider
  remove    Remove a custom model
  rm        Alias for remove
  large     Set or print the large model
  small     Set or print the small model

model add ​

Register a custom model on an existing provider.

text
Usage:
  model add <provider>/<id> [flags]

Flags:
      --name string                 display name
      --context-window int          context window in tokens
      --default-max-tokens int      default maximum output tokens
      --can-reason bool             model supports reasoning
      --supports-images bool        model accepts image input
      --price-input float           input price per 1M tokens
      --price-output float          output price per 1M tokens
      --price-cache-create float    cache-creation price per 1M tokens
      --price-cache-hit float       cache-hit price per 1M tokens
      --reasoning-effort string     low, medium, or high

model remove ​

Remove a custom model from its provider.

text
Usage:
  model remove <provider>/<id>
  model rm <provider>/<id>

model large, model small ​

Set the large or small model slot. With no model argument, print the current selection.

text
Usage:
  model large [<provider>/<id>] [flags]
  model small [<provider>/<id>] [flags]

Flags:
      --think                       enable thinking mode
      --reasoning-effort string     low, medium, or high
      --max-tokens int              maximum output tokens
      --temperature float           sampling temperature
      --top-p float                 top-p sampling (0–1)
      --top-k int                   top-k sampling
      --frequency-penalty float     frequency penalty
      --presence-penalty float      presence penalty
      --provider-options JSON       merge a provider-specific JSON object
bash
model large openai/gpt-4o --think
echo "coding with: $(model large)"   # prints: openai/gpt-4o