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:| Field | Default | Meaning |
|---|---|---|
recommended_max_steps | 30 | Suggested step budget per run |
recommended_max_tokens | 500,000 | Suggested total token budget |
recommended_retry_budget | 3 | Max critic-retry attempts per step |
recommended_temperature | 0.2 | Default sampling temperature |
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
