Skip to main content

Good defaults

GOModel uses a good defaults philosophy. This means that the default settings should be enough to use it.

How to override the default settings?

We use a three-layer configuration pipeline. Every setting has a sensible default, so you can start the server with zero configuration.
As GOModel works out of the box with no configuration files, you can try it in a minute.TODO: the link to the quick start should be provided here!
GOModel automatically discovers providers from well-known environment variables.

Configuration Methods

1. Environment Variables

The most common way to configure GOModel. Set any of the variables below to override defaults.

Server

Cache

Storage

Storage is shared by audit logging, usage tracking, and future features like IAM.

Audit Logging

When LOGGING_LOG_BODIES is enabled, request and response bodies are stored in full. These may contain sensitive data such as PII or API keys embedded in prompts.

Token Usage Tracking

Metrics

HTTP Client

These control timeouts for upstream API requests to LLM providers.

Provider API Keys

Set these to automatically register providers. No YAML configuration required. You can also set a custom base URL for any provider using <PROVIDER>_BASE_URL (e.g., OPENAI_BASE_URL).

2. .env File

GOModel automatically loads a .env file from the working directory at startup. This is convenient for local development.
Copy .env.template to .env and uncomment the values you need:
Real environment variables always override values from the .env file. The .env file is only loaded if it exists — missing it is not an error.

3. Configuration File (YAML)

For more complex setups, you can use an optional YAML configuration file. GOModel looks for it in two locations (in order):
  1. config/config.yaml
  2. config.yaml
To get started, copy the example:
Then uncomment and edit the settings you want to change:
The YAML file supports environment variable expansion using ${VAR} and ${VAR:-default} syntax:
The YAML file is entirely optional. Any setting you can put in YAML can also be set via environment variables. Use YAML when you need to configure custom providers or prefer a structured config file.

Provider Configuration

Auto-Discovery from Environment Variables

The simplest way to add providers. GOModel checks for well-known API key environment variables and automatically registers providers:

YAML Provider Blocks

For more control (custom base URLs, model restrictions, or custom provider names), use the YAML file:

Ollama (Local Models)

Ollama does not require an API key. Set the base URL to enable it:
Or in YAML:
Providers with missing or unresolved API keys are automatically filtered out at startup. Ollama is the only exception — it only requires a base URL.