Sentinel

Configuration

Options and defaults for the Sentinel engine and Forge extension.

Engine configuration

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 options

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 overrides

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.

On this page