Build vs buy for models: capability, cost curves, privacy, and operational burden.
Skip to solutionKEEP THE
mediumAI Engineering
How do you choose between open-weight models and proprietary API models?
469 views
01
Understand the problem
open-weightsapibuild-vs-buyarchitecture
02
Attempt it yourself
Sketch your approach before reading the solution — that's what interviews test.
Nudge consolestandby
Stuck? Beam a request up — the console returns a conceptual nudge that guides your logic without spoiling the implementation.
03
Study the solution
Proprietary APIs (Claude, GPT, Gemini) give top capability with zero infrastructure — you pay per token and accept data leaving your VPC (subject to provider terms). Open-weight models (Llama, Mistral, Qwen) give data control, customization (fine-tunes) and predictable cost at scale, but you own serving, scaling and qu
Solution ready — 2 min read
Classified // press E to declassify
04
Read the code
Provider-agnostic seam so you can switch
interface LlmClient {
complete(req: { system: string; messages: Msg[]; maxTokens: number }): Promise<Reply>;
}
// implementations: AnthropicClient, BedrockClient, VllmClient...
// routing by task tier keeps economics honest:
const client = task.tier === "frontier" ? anthropic : selfHostedSmall;05
Join the discussion
Discussion (0)
Sign in to join the discussion.
No responses yet. Be the first to share what you think.
Transmission complete // awaiting log
KEEP THE
STREAK ALIVE.
Dossier 42 of 80 decoded in the AI Engineering track. One more won't hurt.