Provider & Model Commands

The provider and model commands manage providers and models from your crushrc.

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.

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.

Usage:  provider add <id> [flags]Flags:      --name string                 display name      --type string                 provider type (completions, responses, messages, 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
provider add deepseek \  --type completions \  --base-url "https://api.deepseek.com/v1" \  --api-key "${DEEPSEEK_API_KEY:?set DEEPSEEK_API_KEY}"

The type describes the API format the provider speaks: completions (OpenAI chat completions), responses (OpenAI responses), or messages (Anthropic messages). Local providers with a registered enricher (ollama, litellm, lmstudio, …) keep their own type. Legacy values (openai, openai-compat, anthropic, …) are migrated automatically at load.

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:

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.

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.

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.

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      --thinking string             always, never, or toggleable      --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      --max-attachments int         maximum attachments per request

model remove

Remove a custom model from its provider.

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.

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
model large openai/gpt-4o --thinkecho "coding with: $(model large)"   # prints: openai/gpt-4o

Read this post in your terminal with glow:glow -p https://crush-docs.fly.dev/docs/providers/reference.md

EOF