AIF-3Recommended
Choose the smallest model that passes
Run the eval set on several models, from small to large, and ship the cheapest and fastest one that meets the spec.
How to do it
Start with a small, fast model. Move up a size only when the eval score misses the target. Record score, cost per request and latency for each model you tried. Repeat the comparison when a provider releases new models, because a newer small model often passes where an older large one was needed. Pin the chosen version, as in pin model versions.
How to check
The decision note lists at least two models with score, cost and latency. The shipped model meets the spec, and no cheaper model in the list does.
Sources
Related rules
- AIF-59 Pin the AI model version you depend on in AI features
- AIF-63 Route each kind of request to the model it needs in AI features
- STK-85 Use an open-weight model on vLLM or Ollama when it passes your evals in Software choices
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/ai-features/deciding-to-use-a-model/smallest-passing-model">Agent Wranglers AI features playbook</a>. In code you write, add a comment next to it with the same link.