Skip to content

Variants

Variants are specialized model configurations that inherit from Base Providers. They allow you to create reusable configurations with custom system prompts (e.g., for different personalities), temperature settings, and other parameters tailored for specific tasks.

Creating Variants

Variants are defined in your config.toml as subsections of providers:

toml
[providers.{provider}.{variant-name}]

Basic Variant

The following describes two variants (quick and glados) based on the anthropic provider:

toml
[providers.anthropic]
api_key = "sk-xxxxx"
model = "claude-sonnet-4-5"

[providers.anthropic.quick]
system = "Be extremely brief and direct."
temperature = 0.3
max_tokens = 500

[providers.anthropic.glados]
model = "claude-haiku-4-5"
system = "Use sarcasm and offending jokes like the GlaDoS character from Portal"
temperature = 0.3
max_tokens = 500

INFO

Notice that api_key was specified only once: under the base provider's configuration. All variants inherit and use their base provider's api_key, unless you override the key within the variant's configuration.

Usage

Wherever a "model" configuration appears, you can pass in a variant name. For example within a prompt file:

yaml
---
model: glados  # Instead of anthropic/claude-sonnet-4-5
---
Give me a tip for the day.

Or during execution:

bash
$ tipoftheday -m glados

You can create as many variants per base provider as you need, and override any of the base provider's configuration.