v0.11.1 ab30a57

providers.md RawHistoryFolder

zut providers

zut ships with built-in providers and a model catalog. You can select models with /model, list them with zut --list-models, and add private models in $ZUT_HOME/models.json.

Login methods

Use /login in interactive mode. Type in either provider picker to filter the list by provider ID or display name.

  • api key: stores an API key in $ZUT_HOME/auth.json when the provider uses a normal key.
  • subscription: stores OAuth credentials for subscription-backed providers.

Use /logout to remove stored credentials.

Some providers need more than a single pasted key. For those providers, /login shows setup instructions instead of opening a localhost browser form. This avoids broken browser flows in SSH, containers, and kubectl exec sessions.

Command-backed API keys

A provider can obtain its API key from a password manager or another local program. Configure this directly in $ZUT_HOME/auth.json:

{
  "openai": {
    "api_key_command": {
      "program": "op",
      "args": ["read", "op://Work/OpenAI/credential"],
      "timeout_ms": 120000
    }
  }
}

Custom provider credentials use the same object under additional_api_key_creds:

{
  "additional_api_key_creds": {
    "my-company": {
      "api_key_command": {
        "program": "secret-tool",
        "args": ["read", "my-company-api-key"]
      }
    }
  }
}

The program is started directly rather than through a shell. The timeout defaults to 120 seconds. It must write one non-empty line to stdout, with no more than 64 KiB of output. Trailing CR/LF characters are removed. Successful results stay only in process memory and are reused until zut exits.

Command-backed credentials count as logged in without being executed. zut materializes one only when selecting that provider; background model discovery skips it. /login with a normal key replaces the command, while /logout clears it. Because auth.json can cause program execution, keep it user-writable only and do not use files from untrusted sources.

Setup-instruction providers:

  • Amazon Bedrock
  • Google Vertex AI
  • Cloudflare Workers AI
  • Cloudflare AI Gateway
  • Azure OpenAI Responses

Subscription providers

These providers support subscription login:

Provider Notes
Anthropic Claude Pro/Max OAuth credentials.
OpenAI Codex ChatGPT Plus/Pro Codex subscription route. Separate from the OpenAI API-key provider.
Kimi Kimi subscription login.
xAI SuperGrok or X Premium device-code login. The browser URL is prefilled with the device code.
GitHub Copilot GitHub Copilot token flow.

OAuth tokens are stored in $ZUT_HOME/auth.json and refreshed when refresh is available.

API-key providers

These providers can use environment variables. Simple API-key providers can also be configured through /login. Providers that require extra cloud setup show instructions and should be configured with environment variables.

Provider Environment variable Stored key
Anthropic ANTHROPIC_API_KEY anthropic
OpenAI OPENAI_API_KEY openai
OpenAI Responses OPENAI_API_KEY openai-responses
Kimi KIMI_API_KEY or MOONSHOT_API_KEY kimi
Google Gemini GEMINI_API_KEY or GOOGLE_API_KEY google
DeepSeek DEEPSEEK_API_KEY deepseek
Moonshot AI MOONSHOT_API_KEY moonshotai
Moonshot AI China MOONSHOT_API_KEY moonshotai-cn
Groq GROQ_API_KEY groq
xAI XAI_API_KEY xai
Cerebras CEREBRAS_API_KEY cerebras
Together AI TOGETHER_API_KEY together
Hugging Face HF_TOKEN huggingface
OpenRouter OPENROUTER_API_KEY openrouter
Mistral MISTRAL_API_KEY mistral
ZAI ZAI_API_KEY zai
Xiaomi MiMo XIAOMI_API_KEY xiaomi
Xiaomi Token Plan Amsterdam XIAOMI_TOKEN_PLAN_AMS_API_KEY xiaomi-token-plan-ams
Xiaomi Token Plan China XIAOMI_TOKEN_PLAN_CN_API_KEY xiaomi-token-plan-cn
Xiaomi Token Plan Singapore XIAOMI_TOKEN_PLAN_SGP_API_KEY xiaomi-token-plan-sgp
MiniMax MINIMAX_API_KEY minimax
MiniMax China MINIMAX_CN_API_KEY or MINIMAX_API_KEY minimax-cn
Fireworks FIREWORKS_API_KEY fireworks
Vercel AI Gateway AI_GATEWAY_API_KEY vercel-ai-gateway
OpenCode Zen OPENCODE_API_KEY opencode
OpenCode Go OPENCODE_API_KEY opencode-go
GitHub Copilot token COPILOT_GITHUB_TOKEN or GITHUB_COPILOT_TOKEN github-copilot
Cloudflare Workers AI CLOUDFLARE_API_KEY cloudflare-workers-ai
Cloudflare AI Gateway CLOUDFLARE_API_KEY cloudflare-ai-gateway
Azure OpenAI Responses AZURE_OPENAI_API_KEY azure-openai-responses

Example:

export OPENROUTER_API_KEY=...
zut --provider openrouter

Fast mode

Use /fast or /settings to enable fast mode for subsequent model calls. The setting is off by default and is stored as fast_mode in $ZUT_HOME/config.json.

Fast mode currently requests OpenAI's Fast service tier for OpenAI, OpenAI Responses, and OpenAI Codex requests. Enabling it while using another provider currently returns an error instead of silently changing that provider's request. Subagent children inherit the setting from their parent unless their profile sets fastMode explicitly.

Local llama.cpp router

The llama.cpp provider connects to a multi-model router and is separate from the ollama provider. Ollama normally uses http://localhost:11434; entering that URL for llama.cpp management produces a 404 because Ollama does not implement the router endpoints.

Install a current llama.cpp build. On macOS:

brew install llama.cpp
# use `brew upgrade llama.cpp` for an existing installation

Start llama-server without --model, -m, or -hf. Those flags select one model and disable the router behavior zut expects.

mkdir -p ~/llama-models

llama-server \
  --models-dir ~/llama-models \
  --no-models-autoload \
  --jinja \
  --host 127.0.0.1 \
  --port 8080 \
  -ngl 999 \
  -c 32768

This configuration discovers GGUF files below ~/llama-models, leaves model loading under explicit user control, enables chat templates, requests GPU offload, and sets a 32K context. Tune the GPU layers and context size for the available memory.

Check the management API before opening zut:

curl http://127.0.0.1:8080/health
curl http://127.0.0.1:8080/models

/models must return JSON with a data array. A 404 indicates the wrong URL, an older server build, or single-model mode.

To save the connection, run /login, choose api key, and select llama.cpp. Enter http://127.0.0.1:8080, without /v1, followed by an optional bearer key. zut validates the URL and stores both values in $ZUT_HOME/auth.json. Environment variables override the saved connection:

export LLAMA_BASE_URL=http://127.0.0.1:8080
export LLAMA_API_KEY=optional-secret

If a key is configured, start the router with the same --api-key value. A server bound only to 127.0.0.1 normally does not need authentication.

After login, /llama becomes visible. It shows model state, searches Hugging Face for GGUF repositories, offers available quantizations, reports download and load progress, and explicitly loads or unloads models. Press d on a router-downloaded cache model to ask the router to remove it after confirmation. Models discovered through --models-dir or a preset are not removable through the router API and must be deleted from their configured source. Some llama.cpp versions retain shared Hugging Face repository artifacts such as mmproj files after removing the selected GGUF; remove that repository's cache directory manually if those artifacts are no longer needed. HF_TOKEN raises Hugging Face API limits and may be required for repository metadata. For gated files, approve access first and provide the authorized token to the llama-server process because the router performs the download.

Opening /model refreshes the router and displays its loaded models under provider llama.cpp. Unloaded models cannot handle inference and therefore remain exclusive to /llama until loaded. Inference is sent to the router's derived /v1 endpoint.

Ollama downloads are stored in Ollama's internal layout and do not automatically become llama.cpp models. Obtain a GGUF copy through /llama or place GGUF files under ~/llama-models, then restart the router after adding files manually.

Cloud providers

Amazon Bedrock

Bedrock is configured with AWS credentials, not a generic zut API-key entry. Use one of these credential sources:

# AWS profile
export AWS_PROFILE=your-profile

# IAM access keys
export AWS_ACCESS_KEY_ID=AKIA...
export AWS_SECRET_ACCESS_KEY=...
export AWS_SESSION_TOKEN=... # only for temporary credentials

# Bedrock API key bearer token
export AWS_BEARER_TOKEN_BEDROCK=bedrock-api-key-...

# Region
export AWS_REGION=us-east-1

ECS task roles, IRSA, and other AWS SDK credential-chain sources are also supported.

Example:

AWS_BEARER_TOKEN_BEDROCK=bedrock-api-key-... AWS_REGION=us-east-1 \
  zut --provider amazon-bedrock --model anthropic.claude-sonnet-4-5-20250929-v1:0

Some Bedrock models require regional inference-profile IDs for on-demand throughput, such as us. or eu. prefixed model IDs. zut rewrites known families automatically where possible. Claude Opus 5 uses global.anthropic.claude-opus-5; zut maps the bare foundation-model ID to that global profile and supports its adaptive reasoning levels. Explicit profile IDs and ARNs are left unchanged.

Google Vertex AI

Vertex can use a Google API key when available:

export GOOGLE_CLOUD_API_KEY=...
zut --provider google-vertex

For service-account or application-default credentials, set the standard Google environment variables used by your deployment.

Cloudflare AI Gateway

Cloudflare AI Gateway needs a Cloudflare token plus account and gateway IDs:

export CLOUDFLARE_API_KEY=...
export CLOUDFLARE_ACCOUNT_ID=...
export CLOUDFLARE_GATEWAY_ID=...
zut --provider cloudflare-ai-gateway

Cloudflare Workers AI

Workers AI needs a Cloudflare token and account ID:

export CLOUDFLARE_API_KEY=...
export CLOUDFLARE_ACCOUNT_ID=...
zut --provider cloudflare-workers-ai

Azure OpenAI Responses

export AZURE_OPENAI_API_KEY=...
export AZURE_OPENAI_BASE_URL=https://your-resource.openai.azure.com
export AZURE_OPENAI_API_VERSION=v1 # optional, v1 is the default
zut --provider azure-openai-responses

The provider uses Azure's Responses API. If deployment names differ from zut model IDs, map them without changing the catalog:

export AZURE_OPENAI_DEPLOYMENT_NAME_MAP='gpt-5.6-luna=luna-preview,gpt-5.6-sol=sol-preview'

Auth file

Credentials are stored in $ZUT_HOME/auth.json with user-only permissions when zut creates the file.

Example:

{
  "anthropic": { "api_key": "sk-ant-..." },
  "openai": { "api_key": "sk-..." },
  "google": { "api_key": "..." },
  "additional_api_key_creds": {
    "openrouter": { "api_key": "..." },
    "mistral": { "api_key": "..." }
  }
}

The top-level keys are used for providers with dedicated credential fields. Other API-key providers are stored under additional_api_key_creds. Prefer /login so zut writes the correct schema.

Custom providers and models

Use $ZUT_HOME/models.json for private models, deployment aliases, local servers, or OpenAI-compatible gateways that are not in the built-in catalog. User entries override built-in entries with the same provider and model ID, and adding a models.json no longer hides the built-in catalog: your entries are merged on top of the baked-in and live-discovered models.

A top-level provider key that is not a built-in id defines a custom provider. Give it a provider-level baseUrl and an api wire format (openai for OpenAI-compatible Chat Completions, the default, openai-responses for the OpenAI Responses API, or anthropic for the Anthropic Messages API). A model-level baseUrl overrides the provider-level one for that model, and an unknown api value falls back to openai with a warning.

{
  "providers": {
    "my-company": {
      "baseUrl": "https://llm.mycompany.com/v1",
      "api": "openai",
      "models": [
        { "id": "company-llm-v2", "name": "Company LLM v2" }
      ]
    }
  }
}

Custom providers are first-class: they appear in --list-models, /model, and /login. models.json never stores secrets. Supply the key through /login, --api-key, or a derived environment variable in upper snake case, so my-company reads MY_COMPANY_API_KEY. Because many self-hosted gateways do not expose a model-list endpoint, custom provider keys are accepted and stored without a verification probe; an invalid key surfaces on the first model call.

To retrieve this custom provider's key from a password manager, add a matching entry to $ZUT_HOME/auth.json:

{
  "additional_api_key_creds": {
    "my-company": {
      "api_key_command": {
        "program": "op",
        "args": ["read", "op://Work/OpenAI/credential"],
        "timeout_ms": 120000
      }
    }
  }
}

The provider IDs in models.json and auth.json must match. Then select the custom model directly:

zut --provider my-company --model company-llm-v2

Credential resolution

For each request, zut checks credentials in this order:

  1. Explicit CLI key, such as --api-key.
  2. Provider-specific environment variables (including derived custom-provider variables such as MY_COMPANY_API_KEY).
  3. $ZUT_HOME/auth.json, including custom provider keys saved by /login.

models.json itself never stores credentials; it only describes models and their endpoints.

Bedrock then uses the AWS SDK credential chain for the actual request.

source
1# zut providers
2
3zut ships with built-in providers and a model catalog. You can select models
4with `/model`, list them with `zut --list-models`, and add private models in
5`$ZUT_HOME/models.json`.
6
7## Login methods
8
9Use `/login` in interactive mode. Type in either provider picker to filter the list by provider ID or display name.
10
11- `api key`: stores an API key in `$ZUT_HOME/auth.json` when the provider uses a normal key.
12- `subscription`: stores OAuth credentials for subscription-backed providers.
13
14Use `/logout` to remove stored credentials.
15
16Some providers need more than a single pasted key. For those providers,
17`/login` shows setup instructions instead of opening a localhost browser form.
18This avoids broken browser flows in SSH, containers, and `kubectl exec`
19sessions.
20
21### Command-backed API keys
22
23A provider can obtain its API key from a password manager or another local program. Configure this directly in `$ZUT_HOME/auth.json`:
24
25```json
26{
27  "openai": {
28    "api_key_command": {
29      "program": "op",
30      "args": ["read", "op://Work/OpenAI/credential"],
31      "timeout_ms": 120000
32    }
33  }
34}
35```
36
37Custom provider credentials use the same object under `additional_api_key_creds`:
38
39```json
40{
41  "additional_api_key_creds": {
42    "my-company": {
43      "api_key_command": {
44        "program": "secret-tool",
45        "args": ["read", "my-company-api-key"]
46      }
47    }
48  }
49}
50```
51
52The program is started directly rather than through a shell. The timeout defaults to 120 seconds. It must write one non-empty line to stdout, with no more than 64 KiB of output. Trailing CR/LF characters are removed. Successful results stay only in process memory and are reused until zut exits.
53
54Command-backed credentials count as logged in without being executed. zut materializes one only when selecting that provider; background model discovery skips it. `/login` with a normal key replaces the command, while `/logout` clears it. Because `auth.json` can cause program execution, keep it user-writable only and do not use files from untrusted sources.
55
56Setup-instruction providers:
57
58- Amazon Bedrock
59- Google Vertex AI
60- Cloudflare Workers AI
61- Cloudflare AI Gateway
62- Azure OpenAI Responses
63
64## Subscription providers
65
66These providers support subscription login:
67
68| Provider | Notes |
69| --- | --- |
70| Anthropic | Claude Pro/Max OAuth credentials. |
71| OpenAI Codex | ChatGPT Plus/Pro Codex subscription route. Separate from the OpenAI API-key provider. |
72| Kimi | Kimi subscription login. |
73| xAI | SuperGrok or X Premium device-code login. The browser URL is prefilled with the device code. |
74| GitHub Copilot | GitHub Copilot token flow. |
75
76OAuth tokens are stored in `$ZUT_HOME/auth.json` and refreshed when refresh is
77available.
78
79## API-key providers
80
81These providers can use environment variables. Simple API-key providers can
82also be configured through `/login`. Providers that require extra cloud setup
83show instructions and should be configured with environment variables.
84
85| Provider | Environment variable | Stored key |
86| --- | --- | --- |
87| Anthropic | `ANTHROPIC_API_KEY` | `anthropic` |
88| OpenAI | `OPENAI_API_KEY` | `openai` |
89| OpenAI Responses | `OPENAI_API_KEY` | `openai-responses` |
90| Kimi | `KIMI_API_KEY` or `MOONSHOT_API_KEY` | `kimi` |
91| Google Gemini | `GEMINI_API_KEY` or `GOOGLE_API_KEY` | `google` |
92| DeepSeek | `DEEPSEEK_API_KEY` | `deepseek` |
93| Moonshot AI | `MOONSHOT_API_KEY` | `moonshotai` |
94| Moonshot AI China | `MOONSHOT_API_KEY` | `moonshotai-cn` |
95| Groq | `GROQ_API_KEY` | `groq` |
96| xAI | `XAI_API_KEY` | `xai` |
97| Cerebras | `CEREBRAS_API_KEY` | `cerebras` |
98| Together AI | `TOGETHER_API_KEY` | `together` |
99| Hugging Face | `HF_TOKEN` | `huggingface` |
100| OpenRouter | `OPENROUTER_API_KEY` | `openrouter` |
101| Mistral | `MISTRAL_API_KEY` | `mistral` |
102| ZAI | `ZAI_API_KEY` | `zai` |
103| Xiaomi MiMo | `XIAOMI_API_KEY` | `xiaomi` |
104| Xiaomi Token Plan Amsterdam | `XIAOMI_TOKEN_PLAN_AMS_API_KEY` | `xiaomi-token-plan-ams` |
105| Xiaomi Token Plan China | `XIAOMI_TOKEN_PLAN_CN_API_KEY` | `xiaomi-token-plan-cn` |
106| Xiaomi Token Plan Singapore | `XIAOMI_TOKEN_PLAN_SGP_API_KEY` | `xiaomi-token-plan-sgp` |
107| MiniMax | `MINIMAX_API_KEY` | `minimax` |
108| MiniMax China | `MINIMAX_CN_API_KEY` or `MINIMAX_API_KEY` | `minimax-cn` |
109| Fireworks | `FIREWORKS_API_KEY` | `fireworks` |
110| Vercel AI Gateway | `AI_GATEWAY_API_KEY` | `vercel-ai-gateway` |
111| OpenCode Zen | `OPENCODE_API_KEY` | `opencode` |
112| OpenCode Go | `OPENCODE_API_KEY` | `opencode-go` |
113| GitHub Copilot token | `COPILOT_GITHUB_TOKEN` or `GITHUB_COPILOT_TOKEN` | `github-copilot` |
114| Cloudflare Workers AI | `CLOUDFLARE_API_KEY` | `cloudflare-workers-ai` |
115| Cloudflare AI Gateway | `CLOUDFLARE_API_KEY` | `cloudflare-ai-gateway` |
116| Azure OpenAI Responses | `AZURE_OPENAI_API_KEY` | `azure-openai-responses` |
117
118Example:
119
120```bash
121export OPENROUTER_API_KEY=...
122zut --provider openrouter
123```
124
125## Fast mode
126
127Use `/fast` or `/settings` to enable **fast mode** for subsequent model calls.
128The setting is off by default and is stored as `fast_mode` in
129`$ZUT_HOME/config.json`.
130
131Fast mode currently requests OpenAI's Fast service tier for OpenAI, OpenAI
132Responses, and OpenAI Codex requests. Enabling it while using another provider
133currently returns an error instead of silently changing that provider's request.
134Subagent children inherit the setting from their parent unless their profile
135sets `fastMode` explicitly.
136
137## Local llama.cpp router
138
139The `llama.cpp` provider connects to a multi-model router and is separate from the `ollama` provider. Ollama normally uses `http://localhost:11434`; entering that URL for llama.cpp management produces a 404 because Ollama does not implement the router endpoints.
140
141Install a current llama.cpp build. On macOS:
142
143```bash
144brew install llama.cpp
145# use `brew upgrade llama.cpp` for an existing installation
146```
147
148Start `llama-server` without `--model`, `-m`, or `-hf`. Those flags select one model and disable the router behavior zut expects.
149
150```bash
151mkdir -p ~/llama-models
152
153llama-server \
154  --models-dir ~/llama-models \
155  --no-models-autoload \
156  --jinja \
157  --host 127.0.0.1 \
158  --port 8080 \
159  -ngl 999 \
160  -c 32768
161```
162
163This configuration discovers GGUF files below `~/llama-models`, leaves model loading under explicit user control, enables chat templates, requests GPU offload, and sets a 32K context. Tune the GPU layers and context size for the available memory.
164
165Check the management API before opening zut:
166
167```bash
168curl http://127.0.0.1:8080/health
169curl http://127.0.0.1:8080/models
170```
171
172`/models` must return JSON with a `data` array. A 404 indicates the wrong URL, an older server build, or single-model mode.
173
174To save the connection, run `/login`, choose `api key`, and select `llama.cpp`. Enter `http://127.0.0.1:8080`, without `/v1`, followed by an optional bearer key. zut validates the URL and stores both values in `$ZUT_HOME/auth.json`. Environment variables override the saved connection:
175
176```bash
177export LLAMA_BASE_URL=http://127.0.0.1:8080
178export LLAMA_API_KEY=optional-secret
179```
180
181If a key is configured, start the router with the same `--api-key` value. A server bound only to `127.0.0.1` normally does not need authentication.
182
183After login, `/llama` becomes visible. It shows model state, searches Hugging Face for GGUF repositories, offers available quantizations, reports download and load progress, and explicitly loads or unloads models. Press `d` on a router-downloaded cache model to ask the router to remove it after confirmation. Models discovered through `--models-dir` or a preset are not removable through the router API and must be deleted from their configured source. Some llama.cpp versions retain shared Hugging Face repository artifacts such as `mmproj` files after removing the selected GGUF; remove that repository's cache directory manually if those artifacts are no longer needed. `HF_TOKEN` raises Hugging Face API limits and may be required for repository metadata. For gated files, approve access first and provide the authorized token to the `llama-server` process because the router performs the download.
184
185Opening `/model` refreshes the router and displays its loaded models under provider `llama.cpp`. Unloaded models cannot handle inference and therefore remain exclusive to `/llama` until loaded. Inference is sent to the router's derived `/v1` endpoint.
186
187Ollama downloads are stored in Ollama's internal layout and do not automatically become llama.cpp models. Obtain a GGUF copy through `/llama` or place GGUF files under `~/llama-models`, then restart the router after adding files manually.
188
189## Cloud providers
190
191### Amazon Bedrock
192
193Bedrock is configured with AWS credentials, not a generic zut API-key entry.
194Use one of these credential sources:
195
196```bash
197# AWS profile
198export AWS_PROFILE=your-profile
199
200# IAM access keys
201export AWS_ACCESS_KEY_ID=AKIA...
202export AWS_SECRET_ACCESS_KEY=...
203export AWS_SESSION_TOKEN=... # only for temporary credentials
204
205# Bedrock API key bearer token
206export AWS_BEARER_TOKEN_BEDROCK=bedrock-api-key-...
207
208# Region
209export AWS_REGION=us-east-1
210```
211
212ECS task roles, IRSA, and other AWS SDK credential-chain sources are also
213supported.
214
215Example:
216
217```bash
218AWS_BEARER_TOKEN_BEDROCK=bedrock-api-key-... AWS_REGION=us-east-1 \
219  zut --provider amazon-bedrock --model anthropic.claude-sonnet-4-5-20250929-v1:0
220```
221
222Some Bedrock models require regional inference-profile IDs for on-demand
223throughput, such as `us.` or `eu.` prefixed model IDs. zut rewrites known
224families automatically where possible. Claude Opus 5 uses
225`global.anthropic.claude-opus-5`; zut maps the bare foundation-model ID to that
226global profile and supports its adaptive reasoning levels. Explicit profile IDs
227and ARNs are left unchanged.
228
229### Google Vertex AI
230
231Vertex can use a Google API key when available:
232
233```bash
234export GOOGLE_CLOUD_API_KEY=...
235zut --provider google-vertex
236```
237
238For service-account or application-default credentials, set the standard
239Google environment variables used by your deployment.
240
241### Cloudflare AI Gateway
242
243Cloudflare AI Gateway needs a Cloudflare token plus account and gateway IDs:
244
245```bash
246export CLOUDFLARE_API_KEY=...
247export CLOUDFLARE_ACCOUNT_ID=...
248export CLOUDFLARE_GATEWAY_ID=...
249zut --provider cloudflare-ai-gateway
250```
251
252### Cloudflare Workers AI
253
254Workers AI needs a Cloudflare token and account ID:
255
256```bash
257export CLOUDFLARE_API_KEY=...
258export CLOUDFLARE_ACCOUNT_ID=...
259zut --provider cloudflare-workers-ai
260```
261
262### Azure OpenAI Responses
263
264```bash
265export AZURE_OPENAI_API_KEY=...
266export AZURE_OPENAI_BASE_URL=https://your-resource.openai.azure.com
267export AZURE_OPENAI_API_VERSION=v1 # optional, v1 is the default
268zut --provider azure-openai-responses
269```
270
271The provider uses Azure's Responses API. If deployment names differ from zut
272model IDs, map them without changing the catalog:
273
274```bash
275export AZURE_OPENAI_DEPLOYMENT_NAME_MAP='gpt-5.6-luna=luna-preview,gpt-5.6-sol=sol-preview'
276```
277
278## Auth file
279
280Credentials are stored in `$ZUT_HOME/auth.json` with user-only permissions
281when zut creates the file.
282
283Example:
284
285```json
286{
287  "anthropic": { "api_key": "sk-ant-..." },
288  "openai": { "api_key": "sk-..." },
289  "google": { "api_key": "..." },
290  "additional_api_key_creds": {
291    "openrouter": { "api_key": "..." },
292    "mistral": { "api_key": "..." }
293  }
294}
295```
296
297The top-level keys are used for providers with dedicated credential fields.
298Other API-key providers are stored under `additional_api_key_creds`. Prefer
299`/login` so zut writes the correct schema.
300
301## Custom providers and models
302
303Use `$ZUT_HOME/models.json` for private models, deployment aliases, local
304servers, or OpenAI-compatible gateways that are not in the built-in catalog.
305User entries override built-in entries with the same provider and model ID, and
306adding a `models.json` no longer hides the built-in catalog: your entries are
307merged on top of the baked-in and live-discovered models.
308
309A top-level provider key that is not a built-in id defines a custom provider.
310Give it a provider-level `baseUrl` and an `api` wire format (`openai` for
311OpenAI-compatible Chat Completions, the default, `openai-responses` for the
312OpenAI Responses API, or `anthropic` for the Anthropic Messages API). A
313model-level `baseUrl` overrides the provider-level one for that model, and an
314unknown `api` value falls back to `openai` with a warning.
315
316```json
317{
318  "providers": {
319    "my-company": {
320      "baseUrl": "https://llm.mycompany.com/v1",
321      "api": "openai",
322      "models": [
323        { "id": "company-llm-v2", "name": "Company LLM v2" }
324      ]
325    }
326  }
327}
328```
329
330Custom providers are first-class: they appear in `--list-models`, `/model`, and
331`/login`. `models.json` never stores secrets. Supply the key through `/login`,
332`--api-key`, or a derived environment variable in upper snake case, so
333`my-company` reads `MY_COMPANY_API_KEY`. Because many self-hosted gateways do
334not expose a model-list endpoint, custom provider keys are accepted and stored
335without a verification probe; an invalid key surfaces on the first model call.
336
337To retrieve this custom provider's key from a password manager, add a matching
338entry to `$ZUT_HOME/auth.json`:
339
340```json
341{
342  "additional_api_key_creds": {
343    "my-company": {
344      "api_key_command": {
345        "program": "op",
346        "args": ["read", "op://Work/OpenAI/credential"],
347        "timeout_ms": 120000
348      }
349    }
350  }
351}
352```
353
354The provider IDs in `models.json` and `auth.json` must match. Then select the
355custom model directly:
356
357```sh
358zut --provider my-company --model company-llm-v2
359```
360
361## Credential resolution
362
363For each request, zut checks credentials in this order:
364
3651. Explicit CLI key, such as `--api-key`.
3662. Provider-specific environment variables (including derived custom-provider
367   variables such as `MY_COMPANY_API_KEY`).
3683. `$ZUT_HOME/auth.json`, including custom provider keys saved by `/login`.
369
370`models.json` itself never stores credentials; it only describes models and
371their endpoints.
372
373Bedrock then uses the AWS SDK credential chain for the actual request.

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 476

↑↓ moveenter openesc close