Shared Chatbot Backend · Deployed

MesonX Bot.
Live and answering.

The common chatbot backend for Mesonsoft, sQuark and myfamilyassistant — deployed & verified in sQuarkAI.

sQuarkAI · 6574-7346-4918
~$1–3/mo
Estimated live cost — far under the $50 ceiling.
Live Chat Endpoint
https://bak9x8gml8.execute-api.us-east-2.amazonaws.com/llm/chat

Deployment

MesonX Bot in
sQuarkAI · 6574-7346-4918.

Deployed & verified. Everything a shared chatbot backend needs — and nothing it doesn't.

✓ Live & verified
Item Value
New chat endpoint https://bak9x8gml8.execute-api.us-east-2.amazonaws.com/llm/chat
Lambda mesonx-bot-prod-llm-proxy · python3.12 · 1024MB · ✓ Active
Secret mesonx-bot-prod/api-keys · gemini ✓ openrouter ✓ aimlapi ✓
Resources deployed 13 — Lambda, API Gateway, 2 DynamoDB, secret, IAM, logs
Live chat test HTTP 200, real Gemini reply ✓
Cost ~$1–3/mo — well under the $50 ceiling

Cost-effectiveness

Under $50? Easily.

The design keeps the chatbot's runtime footprint to the bare minimum.

✓
Cost-effectiveness confirmed
Yes — ~$1–3/mo, far under $50.
✓
The only fixed cost is the $0.40 Secrets Manager secret
Lambda, API Gateway, DynamoDB and CloudWatch all sit within or near the free tier.
✓
Even at ~100k chat requests/month it stays under $5
Headroom of more than 10× below the ceiling, even under heavy load.
Verdict: MesonX Bot is cost-effective — roughly ~$1–3/month, a fraction of the $50 limit, with the $0.40 secret as the sole fixed cost.

Runtime path

Order of LLM calls.

Every chat request walks an ordered failover chain — the first provider that succeeds answers; a single upstream hiccup never surfaces as an error.

✓ 3-provider failover
1
The requested provider goes first
provider_order = [requested] + [gemini, openrouter, bedrock] — the caller's choice is always tried before the fallbacks.
2
Gemini (gemini-flash-latest)
Stale model IDs (1.5 / 2.0 / 3.x) are auto-remapped to the current one, so old requests keep working.
3
OpenRouter (meta-llama/llama-3.1-8b-instruct)
Meta's Llama 3.1 8B Instruct — engaged when Gemini errors or lacks a key.
4
AWS Bedrock (anthropic.claude-3-5-haiku-20241022-v1:0) — last resort
Probes the candidate list in order: claude-3-5-haiku → claude-3-haiku → claude-v2:1 → amazon.titan-text-express → meta.llama3-8b-instruct — stops on the first that accepts.
5
All providers exhausted → 502
Only when every step fails does the browser see an error — plus per-user quota is enforced before each attempt.
Called by the same-origin chat.php proxy on all three sites — so the chain runs server-side and the browser only ever talks to its own origin.