Skip to content

fix: prevent bridge death on failed backend switch + auto-restart#659

Merged
1 commit merged intomainfrom
fix/bridge-auto-restart
Mar 31, 2026
Merged

fix: prevent bridge death on failed backend switch + auto-restart#659
1 commit merged intomainfrom
fix/bridge-auto-restart

Conversation

@ShaerWare
Copy link
Copy Markdown
Owner

Summary

  • Root cause: When switching LLM backend to vLLM via admin panel, the bridge was killed BEFORE checking if vLLM is available. If vLLM fails (e.g., on cloud-only server), bridge stays dead permanently until service restart.
  • Fix 1: Move bridge shutdown to AFTER successful vLLM startup (same pattern already used in _switch_to_cloud_provider)
  • Fix 2: Add periodic bridge health check task (every 60s) that auto-restarts the bridge if it crashes

Test plan

  • Switch LLM to vLLM on cloud server — bridge should NOT die if vLLM fails
  • Kill bridge process manually — should auto-restart within 60s
  • Normal bridge chat still works after changes

🤖 Generated with Claude Code

…start

Bridge was killed BEFORE verifying the target backend (vLLM) is available.
If vLLM failed to start, bridge stayed dead with no auto-recovery.
Now bridge is stopped only AFTER successful switch, and a periodic
health check (60s) auto-restarts it if it crashes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ShaerWare ShaerWare closed this pull request by merging all changes into main in 1d28f78 Mar 31, 2026
@ShaerWare ShaerWare deleted the fix/bridge-auto-restart branch March 31, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant