Skip to slide
Chapter 4 · Model-Provider Abstraction and Multi-Model Strategy
29 / 191

CHAPTER 04 · Model-Provider Abstraction and Multi-Model Strategy · 1 / 8

Why decouple

Three forces make provider abstraction worth the effort even if you launch with a single model:

  1. Models change constantly. New versions ship monthly; prices fall; capabilities shift. If switching models means rewriting your agent, you're stuck on yesterday's model.
  2. Different tasks want different models. A complex drafting task wants a top-tier model; generating a chat title wants the cheapest one. Bulk extraction across a thousand documents wants a fast mid-tier model. You can't serve all of these well with one hard-wired choice.
  3. Risk and economics. A second provider is insurance against an outage, a price hike, or a policy change at any one vendor. And letting users bring their own provider key (Chapter 12) requires supporting whichever provider they chose.
← → arrow keys work too