Provider & Model Selection
Choosing the right model for a task: the capability/cost/latency triangle, model tiers within a family, closed vs open-weight models, multimodal capabilities, provider and deployment choices (incl. Azure), and routing cheap tasks to cheap models.
- Reason about the capability / cost / latency triangle when picking a model.
- Choose the right tier within a model family, and route cheap tasks to cheap models.
- Weigh closed vs open-weight models and multimodal needs.
- Understand provider/deployment options (direct API vs Azure/Bedrock/Vertex) and why it matters for FR/BE work.
Specific model names and prices change constantly — don't memorize a leaderboard. Learn the decision framework (this topic) and check current models/pricing at selection time (providers expose a Models API for live capability/context/pricing lookup).
The capability / cost / latency triangle
Every model choice trades off three things:
- Capability — how well it handles the task (reasoning depth, coding, instruction-following, long context, vision).
- Cost — price per input and output token (output is pricier; input can be prompt-cached).
- Latency — how fast it responds (bigger/"smarter" models are usually slower).
There's no universally "best" model — only the best fit for a task's requirements. A high-volume classification endpoint and an overnight autonomous coding agent want opposite ends of this triangle.
↳ Exercise 1 has you map four real tasks (classification, chat support, a hard reasoning job, a batch summarization pipeline) onto the triangle and pick a tier for each — the core selection skill.
Tiers within a family
Providers ship a family of models at different capability/cost points. As a mental model (names vary by provider and change over time):
- Frontier / large tier — most capable, most expensive, slower. For the hardest reasoning, long-horizon agentic work, and correctness-critical tasks.
- Balanced / mid tier — near-frontier quality for most work at lower cost/latency. The default workhorse for production.
- Small / fast tier — cheapest and fastest, weaker on hard reasoning. For simple, high-volume, latency-sensitive tasks (classification, routing, short extractions).
For example, in the Claude family you'd pick from Opus (large), Sonnet (balanced), and Haiku (fast) tiers; OpenAI, Google, and Mistral offer analogous ladders. The names are placeholders — the capability ladder is the durable idea.
Route: don't use one model for everything
A key cost/latency win: route each task to the cheapest model that can do it well. A support assistant might use a fast/cheap model to classify the incoming message and a mid/large model only for the hard replies. This "model routing" (or a cascade: try cheap, escalate on low confidence) can cut cost by an order of magnitude with little quality loss.
from anthropic import Anthropic
client = Anthropic()
def classify(text: str) -> str:
# Cheap, fast model for a simple, high-volume decision.
r = client.messages.create(model="claude-haiku-4-5", max_tokens=10,
messages=[{"role": "user", "content": f"Category (billing/technical/sales): {text}"}])
return r.content[0].text.strip()
def answer_hard(text: str) -> str:
# Larger model only when the task genuinely needs the capability.
r = client.messages.create(model="claude-opus-4-8", max_tokens=1000,
messages=[{"role": "user", "content": text}])
return r.content[0].text
↳ Exercise 2 has you build a two-model router: a cheap model triages, a larger model handles only the cases that need it — and you estimate the cost saving vs. using the large model for everything.
Closed vs open-weight models
- Closed / API models (Claude, GPT, Gemini): you call a hosted API. Top capability, no infra to run, but per-token cost, vendor dependency, and your data leaves your environment (subject to the provider's data terms).
- Open-weight models (Llama, Mistral, Qwen, etc.): you can download and run them yourself (on your own GPUs or a cloud GPU). Full control and data residency, no per-token API fee — but you own the infra, scaling, and (usually) a capability gap vs. the frontier closed models.
Choose open-weight when data must stay in-house, you need offline/edge deployment, you have very high volume where self-hosting is cheaper, or you want to fine-tune deeply. Choose closed API for top capability with zero ops — the common default.
Multimodal
Many models are multimodal — they accept images (and sometimes audio/PDF) alongside text, not just text. If your task involves screenshots, documents, charts, or photos (e.g. "extract data from this invoice image", computer-use agents), you need a vision-capable model. Check the specific model's supported input types; capability and cost differ from text-only use.
Provider & deployment (Azure-relevant)
Beyond which model, there's where you run it:
- Direct provider API (e.g. Anthropic's API) — simplest, latest features first.
- Cloud-hosted — the same models offered through Microsoft Azure (Azure OpenAI / Foundry), AWS Bedrock, or Google Vertex — with that cloud's auth, billing, data-residency, and compliance. For enterprise clients (and much of the FR/BE market, where Azure dominates), running models through Azure is often a hard requirement for procurement, data governance, and SSO. Feature availability can lag the direct API, so verify a needed feature is supported on your chosen platform.
For your consultancy and the job market you're targeting, "can you deploy this on the client's Azure tenant?" is frequently as important as raw model quality. You'll go deep on Azure specifics in the Deployment & Cloud track.
↳ Exercise 3 has you write a short decision memo choosing a model + deployment for a concrete FR/BE client scenario with a data-residency constraint — the consulting-flavored version of this skill.
Recap
- Model choice trades capability / cost / latency — pick the best fit for the task, not a single "best" model.
- Providers offer a tier ladder (large / balanced / fast); route cheap tasks to cheap models and escalate only when needed.
- Closed API = top capability, zero ops, data leaves your env; open-weight = control, data residency, self-hosting effort. Choose by data/volume/capability needs.
- Use a multimodal model when inputs include images/documents.
- Deployment matters: enterprise/FR-BE work often mandates running models via Azure (or Bedrock/Vertex) — verify feature availability on the target platform.
Provider & Model Selection — Exercises
No single "right" model — the reasoning against capability/cost/latency is what matters. Check current model names and pricing at selection time; the framework is what's durable.
Exercise 1 — Map tasks onto the triangle
For each task, decide which corner(s) of the capability/cost/latency triangle dominate and pick a tier (large / balanced / fast): (a) classify 100k support messages/day; (b) a customer-facing chat assistant; (c) an overnight autonomous code-refactoring agent; (d) a nightly batch that summarizes 5,000 documents.
Reference solution
- (a) Classify 100k msgs/day → fast/cheap tier. High volume + simple decision: cost and latency dominate; a small model handles classification fine. (e.g. Haiku-class.)
- (b) Customer-facing chat → balanced tier. Needs good quality and low latency (a user is waiting); the mid workhorse is the sweet spot, escalating only hard turns.
- (c) Overnight autonomous refactoring agent → large/frontier tier. Capability and correctness dominate; latency barely matters (it runs overnight), so pay for the smartest model.
- (d) Nightly batch summarization → fast or balanced tier. Latency irrelevant (batch), so optimize cost; pick the cheapest tier that meets a quality bar on your eval set.
The skill: read which corner dominates from the task's constraints (volume, who's waiting, correctness stakes), then pick the cheapest tier that clears the quality bar.
Exercise 2 — A two-model router
Build a router: a cheap/fast model triages incoming messages, and a larger model handles only the cases that need it (e.g. low-confidence or flagged-hard). Estimate the cost saving vs. using the large model for everything.
Reference solution
from anthropic import Anthropic
client = Anthropic()
def route(text):
triage = client.messages.create(model="claude-haiku-4-5", max_tokens=20,
messages=[{"role":"user","content":f"Is this a simple FAQ or a hard case? Reply 'simple' or 'hard': {text}"}]
).content[0].text.strip().lower()
model = "claude-opus-4-8" if "hard" in triage else "claude-haiku-4-5" # escalate only hard cases
return client.messages.create(model=model, max_tokens=800,
messages=[{"role":"user","content":text}]).content[0].text
Cost sketch: if 80% of traffic is "simple" and handled by the cheap model, you pay the large-model price on only ~20% of requests (plus a tiny triage cost on all). If the large model is ~15× the price of the small one, that's roughly an 70-80% cost cut versus routing everything to the large model — for little quality loss, since the cheap model handles the easy majority well. Validate the split and quality on your golden set (Track 5).
Exercise 3 — A model + deployment decision memo
Write a short decision memo choosing a model AND a deployment for this FR/BE client: a Belgian insurer wants a claims-triage assistant; policyholder data must stay in the EU and procurement mandates Azure. Justify model tier, closed-vs-open, and deployment.
Reference solution
Decision memo — claims-triage assistant (Belgian insurer)
- Deployment: Azure OpenAI in an EU region. Procurement mandates Azure and data must stay in the EU — this is a hard constraint that decides the platform before model quality. It also gives Entra ID SSO and the compliance posture the insurer needs (Deployment track).
- Closed vs open: closed API model on Azure is fine here — Azure OpenAI keeps data in-region with enterprise no-training terms, so the usual "data leaves our env" objection to closed models is addressed without the ops burden of self-hosting. (Self-hosted open-weight would be the alternative if they demanded the model run entirely on their own infra.)
- Model tier: balanced tier for triage, with routing. Claims triage is high-volume classification/extraction — a balanced or fast model handles most of it; route genuinely ambiguous claims to a larger model. Add human review for consequential decisions (Security/Governance track).
- Verify: confirm the chosen model + needed features (e.g. vision, if claims include document images) are available in the target Azure EU region — availability can lag the direct API.
The memo leads with the hard constraints (Azure + EU residency), which decide deployment, then picks the model tier by the task — exactly the consulting-flavored version of model selection.