Skip to content

Feature: Gateway-level /switch command to change auth accounts without AI #7533

@jgottapu

Description

@jgottapu

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:

  1. WhatsApp/Telegram messages go through Gateway → AI model → response
  2. If the model is dead, nothing processes
  3. 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.anthropic in 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions