Per-run token estimates, API cost breakdown by model, runtime benchmarks, and subscription plan comparison — so you know exactly when API beats Pro/Max.
| Workflow | Model | Input Tokens | Output Tokens | Turns | Haiku 4.5 | Sonnet 4.6 | GPT-4o mini | GPT-4o | Opus 4.6 |
|---|---|---|---|---|---|---|---|---|---|
|
⏱ Heartbeat Check
Haiku health ping every 30min
|
Haiku | 2,000 | 80 | 1 | $0.0004 | $0.0072 | $0.0003 | $0.0056 | $0.012 |
|
📋 Telegram Query
"สถานะ?" / "ลูกค้าใหม่?" / simple lookups
|
Sonnet | 8,500 | 400 | 2 | $0.011 | $0.032 | $0.0015 | $0.025 | $0.053 |
|
📌🤖 Calendar Worker
Scan events → Context Router → Lead DB → Create Task
|
Sonnet | 12,000 | 800 | 3 | $0.016 | $0.048 | $0.0022 | $0.038 | $0.080 |
|
🔄 Full Loop
Telegram → Lead lookup → Calendar create → Notion update
|
Sonnet | 18,000 | 1,500 | 5 | $0.026 | $0.077 | $0.0036 | $0.060 | $0.128 |
|
📝 Session Closer
Read last 5 sessions → write summary → Notion log
|
Sonnet | 15,000 | 2,000 | 3 | $0.025 | $0.075 | $0.0034 | $0.058 | $0.125 |
|
🔍 Research Session
Brave search × 3 + compile + Notion write
|
Sonnet | 35,000 | 5,000 | 6 | $0.060 | $0.180 | $0.0083 | $0.138 | $0.300 |
|
📊 Proposal Generator
Transcript + audit + full proposal write
|
Opus/Sonnet | 40,000 | 8,000 | 7 | $0.080 | $0.240 | $0.0108 | $0.180 | $0.400 |
| Workflow | Runs/Month | Cost/Run (Sonnet) | Monthly (Sonnet) | Cost/Run (Haiku) | Monthly (Haiku) | Cost/Run (GPT-4o mini) | Monthly (GPT-4o mini) |
|---|---|---|---|---|---|---|---|
⏱ Heartbeat Every 30min, 24/7 |
1,440 | $0.0072 | $10.37 | $0.0004 | $0.58 | $0.0003 | $0.43 |
📋 Telegram Query ~20 queries/day |
600 | $0.032 | $19.20 | $0.011 | $6.60 | $0.0015 | $0.90 |
📌🤖 Calendar Worker ~5 tasks/day |
150 | $0.048 | $7.20 | $0.016 | $2.40 | $0.0022 | $0.33 |
🔄 Full Loop ~2 per day |
60 | $0.077 | $4.62 | $0.026 | $1.56 | $0.0036 | $0.22 |
📝 Session Closer ~1 per day |
30 | $0.075 | $2.25 | $0.025 | $0.75 | $0.0034 | $0.10 |
🔍 Research Session ~2 per week |
8 | $0.180 | $1.44 | $0.060 | $0.48 | $0.0083 | $0.07 |
📊 Proposal Generator ~2 per week |
8 | $0.240 | $1.92 | $0.080 | $0.64 | $0.0108 | $0.09 |
| TOTAL / MONTH | $47.00 | $13.01 | $2.14 |
| Workflow | Haiku | Sonnet | Opus | GPT-4o |
|---|---|---|---|---|
⏱ Heartbeat |
1–2s | 3–5s | 6–10s | 3–6s |
📋 Telegram Query |
3–6s | 8–15s | 15–25s | 8–12s |
📌🤖 Calendar Worker |
10–20s | 20–40s | 35–60s | 20–35s |
🔄 Full Loop |
30–50s | 45–90s | 90–150s | 40–75s |
📝 Session Closer |
30–60s | 60–120s | 2–3 min | 50–100s |
🔍 Research Session |
2–4 min | 4–8 min | 6–12 min | 3–6 min |
📊 Proposal Generator |
3–5 min | 5–10 min | 8–15 min | 5–8 min |
Time breakdown per run includes: model latency + Notion API calls (~200ms each) + Google API calls (~300–500ms each) + Brave Search (~500ms–1s). Bottleneck is usually Notion rate limit (3 req/s max).
| Bug / Failure | Severity | Affected Workflows | Root Cause | Mitigation |
|---|---|---|---|---|
|
🔤 Alias Not Resolved
Thai nickname not found in Lead DB Aliases field → workflow stalls or errors
|
HIGH | Calendar Worker Full Loop |
Client name spelled differently in calendar vs Lead DB aliases field | Maintain alias list. Add fuzzy match fallback. Return "alias not found" to Telegram with suggestions. |
|
⏱ Notion Rate Limit Hit
Notion API caps at 3 req/sec — multi-step workflows can trigger 429 errors
|
HIGH | All multi-step | Sequential tool calls in rapid succession exceed Notion's 3 req/s limit | Add 350ms delay between Notion calls. Implement exponential backoff on 429. Batch related queries. |
|
📌 Emoji Parse Fail
📌🤖 not detected if calendar event title is truncated or emoji is different variant
|
HIGH | Calendar Worker | Unicode emoji variants (text vs emoji presentation), or long titles truncated by Google Calendar API | Use string contains check, not exact match. Test with both U+1F4CC variants. Log all scanned events. |
|
📅 Thai Date Misparse
"พรุ่งนี้", "อาทิตย์หน้า", "วันศุกร์" misinterpreted or wrong timezone
|
MED | Full Loop Telegram Query |
Relative Thai dates require context-aware parsing. VPS timezone may differ from Bangkok time (UTC+7) | Always confirm date back to user in Telegram before creating event. Set VPS timezone to Asia/Bangkok. |
|
🔗 Wrong Notion Relation ID
Task created in TASKS DB linked to wrong client ID
|
MED | Calendar Worker Full Loop |
Two clients with similar names — Context Router returns wrong Notion page ID | Log resolved client ID + name to Telegram confirmation message. Add "Linked to: [Name]" in reply. |
|
📦 Context Overflow
Large Notion DB response (many records) pushes context over model limit
|
MED | Research Proposal |
Unfiltered DB queries return 100+ records. Large search results from Brave. | Always filter Notion queries (max 10 results). Summarize search results before feeding to next step. |
|
💾 Duplicate Entry Created
Calendar cron runs twice → same task created twice in TASKS DB
|
MED | Calendar Worker | Cron job overlaps if previous run takes longer than cron interval. No idempotency check. | Before creating task, query TASKS DB for existing entry with same calendar event ID. Skip if exists. |
|
🤖 Haiku Misclassification
Haiku heartbeat classifies a complex intent as simple → routes wrong model
|
LOW | All | Haiku is less reliable for nuanced Thai intent classification than Sonnet | Use Haiku only for yes/no health pings. Route all Telegram messages directly to Sonnet. |
|
🔌 VPS Downtime
Self-hosted VPS goes down → all autonomous workflows stop silently
|
LOW | All autonomous | No SLA on self-hosted infrastructure. Network blips, OOM kills, etc. | Set up external uptime monitor (UptimeRobot free tier). Alert to Telegram if ping fails for 5+ min. |
|
🔑 API Key Expiry
Anthropic/OpenAI API key expires or runs out of credits silently
|
LOW | All | No automatic credit top-up or key rotation alert | Set spending alerts in Anthropic console ($10, $30, $50 thresholds). Use auto-recharge. |