Sentinel
1.x
Docs/Sentinel/Configuration
Open

Reading3 min
Updated31 Jul 2026
Sourcev1/concepts/configuration.mdx

Engine configuration01

sentinel.Config holds global defaults that apply to all evaluations unless overridden at the suite level:

type Config struct {
    DefaultModel    string        // LLM model (default: "smart")
    Temperature     float64       // LLM sampling temperature (default: 0)
    PassThreshold   float64       // minimum score to pass (default: 0.7)
    Concurrency     int           // max concurrent case evaluations (default: 4)
    ShutdownTimeout time.Duration // graceful shutdown timeout (default: 30s)
}

Defaults

sentinel.DefaultConfig() // returns:
// Config{
//     DefaultModel:    "smart",
//     Temperature:     0,
//     PassThreshold:   0.7,
//     Concurrency:     4,
//     ShutdownTimeout: 30 * time.Second,
// }

The special model names "smart" and "fast" are resolved by the target adapter to the appropriate model for the provider.

Overriding defaults

Pass a custom config via engine options:

eng, err := engine.New(
    engine.WithConfig(sentinel.Config{
        DefaultModel:  "gpt-4o",
        PassThreshold: 0.8,
        Concurrency:   8,
    }),
    engine.WithStore(pgStore),
)

Engine options02

OptionDescription
engine.WithStore(s)Sets the composite store (required)
engine.WithConfig(cfg)Sets the engine configuration
engine.WithExtension(ext)Registers a plugin extension
engine.WithLogger(l)Sets the structured logger

Suite-level overrides03

Each suite.Suite can override engine-level defaults:

s := &suite.Suite{
    Model:       "claude-3-opus",  // overrides DefaultModel
    Temperature: 0.3,              // overrides Temperature
}

If a suite field is zero-valued, the engine default applies.

Forge extension options04

The extension.New function accepts its own set of options:

ext := extension.New(
    extension.WithStore(pgStore),
    extension.WithExtension(metricsPlugin),
    extension.WithDisableRoutes(),
    extension.WithDisableMigrate(),
    extension.WithBasePath("/sentinel"),
    extension.WithGroveDatabase(""),
)
OptionTypeDefaultDescription
WithStore(s)store.Store--Composite store (auto-resolved from grove if not set).
WithExtension(x)plugin.Extension--Lifecycle hook plugin (repeatable).
WithEngineOption(opt)engine.Option--Pass engine option directly.
WithConfig(cfg)ConfigdefaultsFull config struct.
WithDisableRoutes()--falseSkip HTTP route registration.
WithDisableMigrate()--falseSkip migrations on Start.
WithBasePath(path)string""URL prefix for all sentinel routes.
WithGroveDatabase(name)string""Named grove.DB to resolve from DI.
WithRequireConfig(b)boolfalseRequire config in YAML files.

File-based configuration (YAML)05

When running as a Forge extension, Sentinel automatically loads configuration from YAML config files. The extension looks for config under the following keys (in order):

  1. extensions.sentinel -- standard Forge extension config namespace

  2. sentinel -- top-level shorthand

Example

# forge.yaml
extensions:
  sentinel:
    disable_routes: false
    disable_migrate: false
    base_path: "/sentinel"
    default_model: "smart"
    temperature: 0
    pass_threshold: 0.7
    concurrency: 4
    shutdown_timeout: "30s"
    grove_database: ""

Config fields

YAML KeyTypeDefaultDescription
disable_routesboolfalseSkip HTTP route registration
disable_migrateboolfalseSkip migrations on Start
base_pathstring""URL prefix for all routes
default_modelstring"smart"LLM model identifier
temperaturefloat640LLM sampling temperature
pass_thresholdfloat640.7Minimum score to pass
concurrencyint4Parallel evaluation workers
shutdown_timeoutduration"30s"Max graceful shutdown wait
grove_databasestring""Named grove.DB from DI

Merge behaviour

File-based configuration is merged with programmatic options. Programmatic boolean flags (DisableRoutes, DisableMigrate) always win when set to true. For other fields, YAML values take precedence, then programmatic values, then defaults.