-
Plans run on code, not on the model.
The models were good at explaining trade-offs and bad at fast, exact arithmetic across a week of meals. So a deterministic layer builds and re-portions every plan from a library of 2,394 curated templates, and the model interprets, explains and guides. A full week in under two seconds, at zero model cost, and the numbers are right.
-
Only true misses reach a model.
Logging every food through an LLM was slow and expensive. Text, voice, photo and barcode now flow through one seven-tier resolver: the person's own history, their custom foods, saved meals, a verified nutrition database, and only then a model. Most logs resolve in milliseconds.
-
The coach asks before it acts.
An agent with write access to someone's plan needs rules. Reads run on their own. Anything that changes a plan, a target or a supplement proposes first, waits for consent, then executes, and every action is audit-logged. People trust it with changes because it never surprises them.
-
Cache the part that never changes.
Coach cost rose with usage because the prompt's shared knowledge sat below each user's name and date, so no two users ever shared a cache entry. I split the prompt into a static block identical for everyone and a small per-user block. Same traffic, more than 90% less spend, verified in production.
-
No single provider.
A billing lapse at one provider and a drained key at another each took a feature down. Every call now routes per turn across Anthropic, OpenAI and Google with a fallback chain chosen by task. An outage degrades a feature instead of removing it.
-
Cap what one person can cost.
A subscriber could chat their way past their subscription price. Each user has a monthly spend ceiling on the coach, and only the coach. Logging a meal is never blocked, because that is the thing they pay for. Margin protected, core use never gated.