Provider setup
Custom Providers
Add named OpenAI-compatible or Anthropic-compatible providers without rebuilding Zorai.
Location
Create custom-auth.yaml in the Zorai runtime directory:
| Platform | Path |
|---|---|
| Linux/macOS | ~/.zorai/custom-auth.yaml |
| Windows | %LOCALAPPDATA%\zorai\custom-auth.yaml |
The daemon reloads this file before it sends provider catalog data to TUI or React and before model fetch or provider validation paths use a provider definition.
Example
providers:
- id: local-openai
name: Local OpenAI-Compatible
default_base_url: http://127.0.0.1:11434/v1
default_model: llama3.3
api_key_env: LOCAL_OPENAI_API_KEY
api_type: openai
auth_method: bearer
supports_model_fetch: true
supported_transports: [chat_completions, responses]
default_transport: chat_completions
supported_auth_sources: [api_key]
default_auth_source: api_key
supports_response_continuity: true
models:
- id: llama3.3
name: Llama 3.3
context_window: 128000
modalities: [text, image]
Fields
| Field | Required | Values |
|---|---|---|
id | Yes | Unique provider id. Built-in ids cannot be overridden. |
name | Yes | Display name in TUI and React. |
default_base_url | Yes | Base URL without the final endpoint path, for example https://example.com/v1. |
default_model | Yes | Default model id used when no saved model exists. |
api_key | No | Plain API key for this provider. Kept daemon-side; not returned in provider catalog responses. |
api_key_env | No | Name of an environment variable containing the API key. Preferred for secrets. Ignored when api_key is set. |
api_type | No | openai or anthropic. Defaults to openai. |
auth_method | No | bearer or x-api-key. Defaults to bearer. |
supports_model_fetch | No | Boolean. When true, daemon model fetch uses the provider definition and configured base URL. |
anthropic_base_url | No | Optional Anthropic-compatible base URL used by providers that expose a separate Anthropic endpoint. |
supported_transports | No | responses, chat_completions, anthropic_messages, native_assistant. |
default_transport | No | Must be one of supported_transports. |
native_transport_kind | No | Optional native transport identifier, currently alibaba_assistant_api. |
native_base_url | No | Base URL for the native transport when native_transport_kind is set. |
supports_response_continuity | No | Boolean. Enables previous-response continuation for compatible response transports. |
supported_auth_sources | No | api_key, chatgpt_subscription, or github_copilot. Defaults to api_key. |
default_auth_source | No | Must be one of supported_auth_sources. |
models | No | Static models shown before or instead of remote fetch. |
models[].id | Yes, per model | Provider model id sent to the upstream API. |
models[].name | No | Display name. Defaults to models[].id. |
models[].context_window | Yes, per model | Positive integer token context window. |
models[].modalities | No | text, image, video, audio. Defaults to text. |
Validation
Invalid custom provider entries never stop the daemon. Valid entries still load, built-in providers stay available, and the provider catalog response includes diagnostics with the file path, provider id, field, and error message. Missing or empty api_key_env variables are reported this way and simply leave that provider unauthenticated. TUI logs these diagnostics and React reports them in the developer console while continuing to run.