Step 1 — Build a model with a preset
The fastest way to get a model configured for a specific family isbuild_model_for_preset:
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: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, usepreset.override() to create a customized copy:
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:Step 5 — Compare runs in qita
After running the same task with different families, launch qita to compare:- which protocol each run used
- the parser and tool delivery mode
- step count, token usage, and cost
- where runs diverged
Recommended defaults
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
Theexamples/real/claude_code_agent.py example demonstrates the full switching workflow via CLI:
- explicit CLI flags
- environment variables (
QITOS_MODEL_FAMILY,QITOS_MODEL,OPENAI_BASE_URL) - family preset defaults
- 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
