Document command-backed custom providers
- commit
- 4657b320119cb056ae995d44fc402dd834cd0e73
- author
- patriceckhart · · 2026-07-25 07:58 UTC
- parent
- 6f37bbb
- signature
- unsigned
- refs
- tag: v0.3.6
2 files · +46 -0
M README.md +22 -0
| @@ -487,6 +487,28 @@ A top-level provider key that is not a built-in id defines a custom provider. Gi | |||
| 487 | 487 | ||
| 488 | 488 | 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. | |
| 489 | 489 | ||
| 490 | + | To retrieve this custom provider's key from a password manager, add a matching entry to `$ZOT_HOME/auth.json`: | |
| 491 | + | ||
| 492 | + | ```json | |
| 493 | + | { | |
| 494 | + | "additional_api_key_creds": { | |
| 495 | + | "my-company": { | |
| 496 | + | "api_key_command": { | |
| 497 | + | "program": "op", | |
| 498 | + | "args": ["read", "op://Work/OpenAI/credential"], | |
| 499 | + | "timeout_ms": 120000 | |
| 500 | + | } | |
| 501 | + | } | |
| 502 | + | } | |
| 503 | + | } | |
| 504 | + | ``` | |
| 505 | + | ||
| 506 | + | The provider IDs in `models.json` and `auth.json` must match. Then select the custom model directly: | |
| 507 | + | ||
| 508 | + | ```bash | |
| 509 | + | zot --provider my-company --model company-llm-v2 | |
| 510 | + | ``` | |
| 511 | + | ||
| 490 | 512 | ### Kimi Code | |
| 491 | 513 | ||
| 492 | 514 | zot has built-in Kimi support through the Kimi Coding endpoint and Moonshot's OpenAI-compatible chat API. | |
| @@ -487,6 +487,28 @@ A top-level provider key that is not a built-in id defines a custom provider. Gi | |||||
| 487 | 487 | ||||
| 488 | 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. | 488 | 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. | ||
| 489 | 489 | ||||
| 490 | + | To retrieve this custom provider's key from a password manager, add a matching entry to `$ZOT_HOME/auth.json`: | |||
| 491 | + | ||||
| 492 | + | ```json | |||
| 493 | + | { | |||
| 494 | + | "additional_api_key_creds": { | |||
| 495 | + | "my-company": { | |||
| 496 | + | "api_key_command": { | |||
| 497 | + | "program": "op", | |||
| 498 | + | "args": ["read", "op://Work/OpenAI/credential"], | |||
| 499 | + | "timeout_ms": 120000 | |||
| 500 | + | } | |||
| 501 | + | } | |||
| 502 | + | } | |||
| 503 | + | } | |||
| 504 | + | ``` | |||
| 505 | + | ||||
| 506 | + | The provider IDs in `models.json` and `auth.json` must match. Then select the custom model directly: | |||
| 507 | + | ||||
| 508 | + | ```bash | |||
| 509 | + | zot --provider my-company --model company-llm-v2 | |||
| 510 | + | ``` | |||
| 511 | + | ||||
| 490 | ### Kimi Code | 512 | ### Kimi Code | ||
| 491 | 513 | ||||
| 492 | zot has built-in Kimi support through the Kimi Coding endpoint and Moonshot's OpenAI-compatible chat API. | 514 | zot has built-in Kimi support through the Kimi Coding endpoint and Moonshot's OpenAI-compatible chat API. | ||
M docs/providers.md +24 -0
| @@ -322,6 +322,30 @@ Custom providers are first-class: they appear in `--list-models`, `/model`, and | |||
| 322 | 322 | not expose a model-list endpoint, custom provider keys are accepted and stored | |
| 323 | 323 | without a verification probe; an invalid key surfaces on the first model call. | |
| 324 | 324 | ||
| 325 | + | To retrieve this custom provider's key from a password manager, add a matching | |
| 326 | + | entry to `$ZOT_HOME/auth.json`: | |
| 327 | + | ||
| 328 | + | ```json | |
| 329 | + | { | |
| 330 | + | "additional_api_key_creds": { | |
| 331 | + | "my-company": { | |
| 332 | + | "api_key_command": { | |
| 333 | + | "program": "op", | |
| 334 | + | "args": ["read", "op://Work/OpenAI/credential"], | |
| 335 | + | "timeout_ms": 120000 | |
| 336 | + | } | |
| 337 | + | } | |
| 338 | + | } | |
| 339 | + | } | |
| 340 | + | ``` | |
| 341 | + | ||
| 342 | + | The provider IDs in `models.json` and `auth.json` must match. Then select the | |
| 343 | + | custom model directly: | |
| 344 | + | ||
| 345 | + | ```sh | |
| 346 | + | zot --provider my-company --model company-llm-v2 | |
| 347 | + | ``` | |
| 348 | + | ||
| 325 | 349 | ## Credential resolution | |
| 326 | 350 | ||
| 327 | 351 | For each request, zot checks credentials in this order: | |
| @@ -322,6 +322,30 @@ Custom providers are first-class: they appear in `--list-models`, `/model`, and | |||||
| 322 | not expose a model-list endpoint, custom provider keys are accepted and stored | 322 | not expose a model-list endpoint, custom provider keys are accepted and stored | ||
| 323 | without a verification probe; an invalid key surfaces on the first model call. | 323 | without a verification probe; an invalid key surfaces on the first model call. | ||
| 324 | 324 | ||||
| 325 | + | To retrieve this custom provider's key from a password manager, add a matching | |||
| 326 | + | entry to `$ZOT_HOME/auth.json`: | |||
| 327 | + | ||||
| 328 | + | ```json | |||
| 329 | + | { | |||
| 330 | + | "additional_api_key_creds": { | |||
| 331 | + | "my-company": { | |||
| 332 | + | "api_key_command": { | |||
| 333 | + | "program": "op", | |||
| 334 | + | "args": ["read", "op://Work/OpenAI/credential"], | |||
| 335 | + | "timeout_ms": 120000 | |||
| 336 | + | } | |||
| 337 | + | } | |||
| 338 | + | } | |||
| 339 | + | } | |||
| 340 | + | ``` | |||
| 341 | + | ||||
| 342 | + | The provider IDs in `models.json` and `auth.json` must match. Then select the | |||
| 343 | + | custom model directly: | |||
| 344 | + | ||||
| 345 | + | ```sh | |||
| 346 | + | zot --provider my-company --model company-llm-v2 | |||
| 347 | + | ``` | |||
| 348 | + | ||||
| 325 | ## Credential resolution | 349 | ## Credential resolution | ||
| 326 | 350 | ||||
| 327 | For each request, zot checks credentials in this order: | 351 | For each request, zot checks credentials in this order: | ||