AI Engineering · Llm Genai Ops
Free preview: the first part of this 14-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
AI Engineering
Unlock this lesson and the 199 other paid lessons
$49 once, by PayPal
See the AI Engineering courseread the rest of this lesson in
AI Engineering
Unlock this lesson and the 199 other paid lessons
$49 once, by PayPal
See the AI Engineering coursein Llm Genai Ops
This lesson is part of the AI Engineering course. Unlock the full course, a separate one-time payment, for lifetime access.
One-time payment: UPI, card or netbanking
Get Lifetime AccessFoundation lessons of this course are free, no payment needed. Try them now
The same request can cost you sixteen times more depending on which model answers it. At list prices in 2025, OpenAI's gpt-4o-mini bills about 0.15 dollars per million input tokens while gpt-4o bills about 2.50, and the output side keeps the same ratio, roughly 0.60 against 10.00 dollars, so the strong model is around sixteen times the price of the cheap one per token. Check the current numbers on the pricing page, because they move, but the shape is stable, and Anthropic's lineup has the same shape, with Haiku a fraction of Sonnet (pricing). That gap is the entire reason model routing exists. Send every request to the strong model and most of your bill is easy questions answered by an expensive model that a cheap one would have gotten right.
The trouble shows up on the way to using that gap. Summarization calls the cheap model from one service. The code assistant calls the strong model from another. Someone wired in a specialist for extraction last quarter, straight into a third code path. No single place decides which model handles a request, no single place records what it cost, and no single place lets you change a model. When the strong model shipped a new version, three teams found out separately, and the extraction eval that was pinned to the old version quietly started grading a different model. The cost of that sprawl is not only money. It is that you cannot answer the two questions a finance review will ask, which model served this traffic and what did it cost, because the answer lives in three log formats across three services.

Two ideas clean this up. Model selection, which decides per request which model runs, and a gateway, which is the one layer every model call passes through. This is a different decision from the one in the lesson on fine-tuning versus RAG versus prompting. That lesson picks how you adapt a model before you ship. This one picks which model answers each live request, and then makes sure the picking happens in a place you can see and gate.