Skip to main content
Family presets (pre-configured defaults for a model family) let you switch model families with minimal code changes. This tutorial shows you how to build an agent that runs on multiple families, override a preset when you need to, and compare the results in qita.

Step 1 — Build a model with a preset

The fastest way to get a model configured for a specific family is build_model_for_preset:
This returns a fully configured model object with the Qwen family preset already applied — the right protocol, parser, tool delivery mode, and context window.

Step 2 — Run the same agent with different families

The key insight is that your agent code does not change. Only the model construction changes:
Each build_model_for_preset call resolves the correct protocol, parser, tool delivery, and context policy for that family.

Step 3 — Override a preset

When a built-in preset does not match your needs, use preset.override() to create a customized copy:
The override() method returns a new FamilyPreset instance — the original is never mutated.

Step 4 — Explore available presets

Use the CLI to see which presets are available:
This prints a table showing each preset’s ID, protocol, tool delivery mode, context window, and recommended models. You can also list available benchmarks:

Step 5 — Compare runs in qita

After running the same task with different families, launch qita to compare:
In the board view, select two runs and click Compare to see:
  • which protocol each run used
  • the parser and tool delivery mode
  • step count, token usage, and cost
  • where runs diverged
This makes it easy to see how different presets affect agent behavior on the same task. Gold presets (Qwen, Kimi, MiniMax, gpt-oss, Gemma 4) include advisory defaults for research baselines: These are advisory — the engine does not auto-apply them. Use them as starting points for your own experiments.

The CLI switching pattern

The examples/real/claude_code_agent.py example demonstrates the full switching workflow via CLI:
Priority order for model configuration:
  1. explicit CLI flags
  2. environment variables (QITOS_MODEL_FAMILY, QITOS_MODEL, OPENAI_BASE_URL)
  3. family preset defaults
  4. framework fallback

Family presets concept

Understand what each preset field means

Model family matrix

See all 10 built-in presets and their defaults

Add a family preset

Extend QitOS with a new model family

Observability

Learn how preset metadata appears in traces