Location

Create custom-auth.yaml in the Zorai runtime directory:

PlatformPath
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

FieldRequiredValues
idYesUnique provider id. Built-in ids cannot be overridden.
nameYesDisplay name in TUI and React.
default_base_urlYesBase URL without the final endpoint path, for example https://example.com/v1.
default_modelYesDefault model id used when no saved model exists.
api_keyNoPlain API key for this provider. Kept daemon-side; not returned in provider catalog responses.
api_key_envNoName of an environment variable containing the API key. Preferred for secrets. Ignored when api_key is set.
api_typeNoopenai or anthropic. Defaults to openai.
auth_methodNobearer or x-api-key. Defaults to bearer.
supports_model_fetchNoBoolean. When true, daemon model fetch uses the provider definition and configured base URL.
anthropic_base_urlNoOptional Anthropic-compatible base URL used by providers that expose a separate Anthropic endpoint.
supported_transportsNoresponses, chat_completions, anthropic_messages, native_assistant.
default_transportNoMust be one of supported_transports.
native_transport_kindNoOptional native transport identifier, currently alibaba_assistant_api.
native_base_urlNoBase URL for the native transport when native_transport_kind is set.
supports_response_continuityNoBoolean. Enables previous-response continuation for compatible response transports.
supported_auth_sourcesNoapi_key, chatgpt_subscription, or github_copilot. Defaults to api_key.
default_auth_sourceNoMust be one of supported_auth_sources.
modelsNoStatic models shown before or instead of remote fetch.
models[].idYes, per modelProvider model id sent to the upstream API.
models[].nameNoDisplay name. Defaults to models[].id.
models[].context_windowYes, per modelPositive integer token context window.
models[].modalitiesNotext, 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.