Skip to content

Fix proxy failover status output#144

Merged
unive3sal merged 1 commit intoSaladDay:mainfrom
apple-ouyang:fix-proxy-failover-status
May 7, 2026
Merged

Fix proxy failover status output#144
unive3sal merged 1 commit intoSaladDay:mainfrom
apple-ouyang:fix-proxy-failover-status

Conversation

@apple-ouyang
Copy link
Copy Markdown
Contributor

Summary

Fixes #143.

This updates the CLI proxy output so it no longer hard-codes automatic failover as disabled. The proxy runtime already reads per-app auto_failover_enabled and routes through the configured failover queue when enabled, so the old message was misleading.

Changes:

  • Show a neutral local-proxy mode description in cc-switch proxy show.
  • Print per-app automatic failover status for Claude, Codex, and Gemini.
  • Make cc-switch proxy serve print the configured automatic failover status instead of saying it is disabled.
  • Add a regression test that enables Codex auto failover and verifies the CLI status output reflects it.

Tests

  • cargo fmt --all
  • cargo test cli::commands::proxy::tests::proxy_overview_lines --lib
  • cargo test proxy::provider_router::tests --lib

Note: cargo test --lib on my local macOS environment still has two unrelated proxy runtime/session failures that reproduce when run individually. One fails because a local cc-switch process is already listening on 127.0.0.1:15721; the other is managed_session_ready_info_accepts_persisted_session_without_status_probe.

@unive3sal
Copy link
Copy Markdown
Collaborator

Hi @apple-ouyang

Thanks for your contribution! Would you please rebase your commit for review?

@apple-ouyang apple-ouyang force-pushed the fix-proxy-failover-status branch from 2fa4c18 to b72ac76 Compare May 2, 2026 08:20
@apple-ouyang
Copy link
Copy Markdown
Contributor Author

Rebased, should be OK now. Please take another look.

@SaladDay
Copy link
Copy Markdown
Owner

SaladDay commented May 6, 2026

LGTM, cc @unive3sal

@unive3sal unive3sal merged commit 84495e3 into SaladDay:main May 7, 2026
1 check passed
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.

CLI proxy output incorrectly says automatic failover is disabled

3 participants