Index/Foundations

Get Premium
CourseAI Engineering · 0120 minPremium

Foundations

The layer every other lesson stands on: a model client behind your own types, answers streamed over SSE, errors classified into policy, prompts versioned like code, and a fake model so the whole stack runs in tests.

Premium

Part of the AI Engineering course, on the Premium plan

Readers with Lifetime Access read it in full. Already bought it? Sign in from the top bar.

What’s inside

  • 1. The model API is stateless
  • 2. Wrap the SDK behind your own types
  • 3. The adapter: the only file that knows the SDK
  • 4. Streaming is a product requirement
  • 5. Errors: let the SDK retry, you classify
  • 6. Prompts are code
  • 7. Configuration that fails at deploy, not at the first customer
  • 8. Testing without a model
  • What breaks in production
  • Exercises
  • Check yourself