What it does
Paste an email, screenshot text, or confirmation → AI extracts structured booking fields and pre-fills the form.
Where to find it
Button inside Flight, Ground, and Expenses forms ("Paste text → fill").
How to use it
- Tap "Smart Fill"
- Paste raw text (up to 8000 chars)
- AI returns structured fields; review and save
Supported kinds
flight— airline, IATA codes, PNR, gate, seat, terminalground— operator, station, platform, coach, seatinsurance— policy, coverage dates, limits, hotlinereceipt— merchant, amount, currency, category, tax
Admin controls
- Kill switch: Feature Flags →
ai_email_import_enabled - Per-user daily cap (default 50/day for free users; admins unlimited)
- AI Usage page tracks calls and cost
Edge cases
- 8000-char hard limit (returns 400 before reaching the model)
- 20 requests/min burst limit per user
- Admin users: no caps, no burst limit, no kill switch
Related files
src/lib/smart-fill.ts, src/components/SmartFillSheet.tsx, supabase/functions/ai-assistant/index.ts