Skip to content

Configuration

InfonChat reads its runtime settings from two sources:

  1. A YAML configuration file that follows the AppConfig schema from the backend.
  2. Provider credentials discovered from environment variables such as OPENAI_API_KEY or HF_TOKEN.

Selecting a config file

Set INFONCHAT_CONFIG_FILE to the absolute or relative path of your YAML file before starting the backend.

If the variable is not set, the backend falls back to the built-in defaults for queue, embeddings, and provider lists.

File format

Only .yaml/.yml files are supported. The file is parsed with yaml.safe_load, validated using Pydantic, and merged with any providers that were inferred from environment variables.

auth:
  signup:
    enabled: true

queue:
  max_buffer_size: 64
  worker_concurrency: 4

providers:
  - name: openai-default
    options:
      type: openai
      api_key: sk-...
      headers:
        Authorization: Bearer sk-...

All fields map directly to the models in backend.config.types. Omitting a field means the backend will use the defaults baked into those models.

Environment-discovered providers

Even when you supply a YAML file, the backend will append providers for each of the recognized environment variables.

See the managed providers guide for more context and recommended practices, and use this flow to keep secrets out of your config files while still maintaining a stable provider definition.

Disabling password sign-ups

Set auth.signup.enabled: false in your YAML file to short-circuit the /api/v1/user/sign-up/password endpoint. When disabled, the handler returns HTTP 403 and no database writes are attempted. This is useful for deployments where administrators create accounts manually.

JSON schema endpoint

To help tooling (e.g., editors or CI validation) you can fetch the JSON schema for the configuration model at GET /config-schema.json. The endpoint is served by the backend itself and reflects the exact Pydantic schema shipped with the current build.

VS Code YAML language server

If you use the Red Hat YAML extension in VS Code, you can associate the schema with your config file so that validation and completions match the backend. Add a document-wide comment at the top of your YAML file such as:

# yaml-language-server: $schema=http://your-host/config-schema.json

Alternatively, configure the schema mapping globally (see the extension docs) to apply it to every infonchat.yaml file in your workspace.