-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
Description
Problem
When the upstream AI model is unreachable (rate limits, auth errors, network issues), users have no way to switch to a backup account because:
- WhatsApp/Telegram messages go through Gateway → AI model → response
- If the model is dead, nothing processes
- Chicken-and-egg: need AI to change config, but can't reach AI
This caused a full day of downtime today - the system was stuck hitting rate limits on one account with no way to switch to the other.
Proposed Solution
Add gateway-level commands that bypass the AI entirely:
/switch primary # Switch to primary Anthropic account
/switch secondary # Switch to secondary account
/switch toggle # Toggle between accounts
/switch status # Show current account
These commands should:
- Be intercepted at the gateway level before reaching the AI
- Modify
auth.order.anthropicin config - Restart the gateway automatically
- Work even when the AI model is completely unreachable
Current Workaround
Created a shell script that modifies config and restarts gateway, triggered via iOS Shortcut over SSH. Works, but requires SSH access and isn't as seamless as a native command.
Why This Matters
Multi-account setups exist precisely for redundancy. But if the failover mechanism requires the failing component to work, it's not really redundant. The gateway should be able to switch accounts independently of AI availability.
Additional Context
- Config path:
auth.order.anthropic: ["secondary", "primary"] - First account in array is used
- Just need to swap the order and restart