Skip to content

02. Models & API Selection ​

Foundations·Chapter 02

Trade-offs among parameters, price and latency

2 posts

Where this chapter fits: selection is not choosing the “strongest model” but the combination that best balances cost, latency and quality for this scenario. This chapter offers an actionable selection framework: task decomposition, candidate filtering, small-sample evaluation, routing and degradation, plus factoring compliance and rate limits into the decision.

Questions this chapter answers ​

  • Self-hosted inference versus calling an API — where is the break-even point?
  • Is one model enough, or do you need multi-model routing?
  • How do constraints like rate limits, context and data boundaries get quantified into the selection?

Article index ​

Topic backlog ​

  • The selection framework: task granularity, quality bar, latency budget, cost ceiling
  • Small-sample A/B evaluation: drawing usable conclusions from 50 examples
  • Time-to-first-token and the streaming experience threshold (measured basis)
  • Multi-model routing and degradation: when it is actually worth doing
  • Total cost accounting for self-hosting open models: GPU-hours, operations and idle rate
  • Data boundaries and compliance: which data cannot leave the perimeter
  • Handling API changes: version pinning, regression tests and alerting

OpenAIChat · Full-stack engineering for LLM-powered conversations and apps