# Models as Typed Capabilities **Track:** Models, Tools & Agents — AI-Native Full-Stack Development — complete (30) **Framework / surface:** web dev (AI SDK / structured outputs) **Level:** Intermediate **Prerequisites:** TypeScript for AI-Native Builders, Server/Client Boundaries & Routing **In one line:** Treat a model call as a typed capability with validated input and output, not a free-form prompt hidden in application code. ## Theory, aesthetics & inspiration String in, string out is the easiest model integration and the hardest to build on, because downstream code must scrape structure out of prose. The durable pattern treats a model call as a typed capability: the application supplies input, the model performs a bounded transformation or judgment, and the result is validated against an explicit schema before anything else touches it — the approach current toolkits like Vercel's AI SDK implement as schema-constrained structured output. The schema guarantees shape, not truth; it makes generation inspectable by the rest of the program while everyone remembers the contents are probabilistic. The deeper shift is from prompt engineering to interface design: name capabilities for the job — classifySubmission, proposeLayout, extractEntities, critiqueComposition — and keep model choice and prompt text hidden behind the boundary, so provider and wording can change without rewriting the product. Evals then measure the capability against its contract, independent of whichever prompt or model currently implements it. **Builder question:** What stable input/output contract could represent this model capability even if you replaced the prompt or provider tomorrow?