Skip to main content
The goal in GoModel is to make config.yaml optional as much as possible. Prefer environment variables for normal deployments, CI, containers, and secret injection. Use config.yaml when you need structure that env vars cannot express cleanly, especially:
  • multiple providers with the same type
  • custom provider instance names such as ollama-a, ollama-b, or my-openai
  • larger nested config that is easier to review in one file
For Oracle specifically, a single fallback model list can now stay in env via ORACLE_MODELS. Use YAML when you need custom Oracle provider names or more than one Oracle provider instance.

Priority Order

Effective precedence is:
  1. environment variables
  2. optional config/config.yaml or config.yaml
  3. built-in defaults from code
.env is not a separate priority layer. It is just a convenient way to load environment variables before startup.

Current Schema

The current source of truth lives in the main codebase:

Docker

GoModel reads config/config.yaml first, then config.yaml. With docker run, you can keep a host file named config.yml and mount it to the in-container path GoModel expects:
docker run --rm -p 8080:8080 \
  -v "$PWD/config.yml:/app/config/config.yaml:ro" \
  enterpilot/gomodel:latest
With Docker Compose:
services:
  gomodel:
    image: enterpilot/gomodel:latest
    ports:
      - "8080:8080"
    volumes:
      - ./config.yml:/app/config/config.yaml:ro
If env vars and YAML both define the same setting, the environment variable wins.