Docs

AI features

KhaoNow ships six AI features. Every one has a daily quota and a per-tenant cost ceiling, surfaced live in the admin panel under Settings → AI Quotas.

Three-layer cost defense

We learned this the hard way: shipping AI without a budget is how startups go bankrupt. Every AI feature is guarded by three layers:

  1. Per-feature daily quota — N requests per tenant per day per feature. Once hit, the feature falls back to a non-AI path (or skips, depending on the feature).
  2. Per-tenant daily cost ceiling — across ALL AI features, your tenant can’t spend more than aiDailyCostCeilingPaisa per day. Default PKR 1,000. The ceiling is the safety net behind the per-feature quotas.
  3. Per-request hard cap — some features (menu OCR) have a per-request token cap so a single oversized input can’t burn an hour’s worth of quota.

A/B rollout

Each feature can be rolled out gradually. Default 20% of relevant events. SuperAdmin can override per tenant. The performance dashboard shows AI vs control-arm AOV, so you can confirm the feature is actually winning before scaling rollout to 100%.

Per-feature reference

FeatureWhat it doesDefault daily capCost per call
Smart cart upsellPicks best add-on for the cart200 carts~PKR 0.02
Landing personalization”For you” homepage200 renders~PKR 0.10
Menu copyAuto-draft item descriptions20 generations~PKR 0.05
Photo critiqueScores menu photos20 critiques~PKR 1.20
Review analysisTheme clusters from reviews20 batches~PKR 30/100 reviews
Menu OCRPhoto → digital menu20 imports~PKR 8–15

Provider abstraction

All AI features go through a provider abstraction so we can switch LLMs without re-shipping features. Today we default to Gemini 2.5 Flash Lite. Tenants on the Scale tier can choose to bring their own API key (BYOK) to bypass our quotas entirely.

Kill switch

Each AI feature has a master enable/disable toggle in Settings → AI Quotas. Flipping disabled stops the feature instantly across the platform without losing settings or history.