CH 04 · Model-Provider Abstraction and Multi-Model Strategy · 02/15
Read as one pageWhy decouple
Three forces make provider abstraction worth the effort even if you launch with a single model:
- 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.
- 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.
- 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.
Finished this idea?
Your learning progress stays in this browser.