vibeproxy icon indicating copy to clipboard operation
vibeproxy copied to clipboard

Authentication failed: flag provided but not defined: -github-copilot-login

Open danielsar-build opened this issue 7 months ago • 5 comments

When trying to set up GitHub Copilot authentication through the VibeProxy UI, the app throws an authentication error because the bundled cli-proxy-api-plus backend does not recognize the -github-copilot-login flag. It appears the UI has been updated to use this new flag, but the underlying CLI binary bundled in the app still expects the older -codex-login flags.

Steps to Reproduce:

  1. Open VibeProxy.
  2. Attempt to authenticate/log in using the GitHub Copilot option.
  3. The browser does not open, and an "Authentication Result" error window appears.

Expected Behavior: The app should successfully pass the correct flag to the CLI backend, open the browser for OAuth, and complete the GitHub Copilot login.

Actual Behavior:

The UI passes an undefined flag, resulting in the following error: Authentication Result Authentication failed. Please check if the browser opened and try again. Details: flag provided but not defined: -github-copilot-login Usage of /Applications/VibeProxy.app/Contents/Resources/cli-proxy-api-plus ... -codex-device-login Login to Codex using device code flow -codex-login Login to Codex using OAuth ...

Image

Environment: • OS: macOS • VibeProxy Version: 1.8.142

danielsar-build avatar May 01 '26 13:05 danielsar-build

yup, got the same:

Authentication failed. Please check if the browser opened and try again.

Details: flag provided but not defined: -github-copilot-login
Usage of /Applications/VibeProxy.app/Contents/Resources/cli-proxy-api-plus
-antigravity-login
Login to Antigravity using OAuth
-claude-login
Login to Claude using OAuth
-codex-device-login
Login to Codex using device code flow
-codex-login
Login to Codex using OAuth
-config string
Configure File Path
-kimi-login
Login to Kimi using OAuth
-local-model
Use embedded model catalog only, skip remote model fetching
-login
Login Google Account
-no-browser
Don't open browser automatically for OAuth
-oauth-callback-port int
Override OAuth callback port (defaults to provider-specific port)
-project_id string
Project ID (Gemini only, not required)
-standalone
In TUI mode, start an embedded local server
-tui
Start with terminal management UI
-vertex-import string
Import Vertex service account key JSON file
-vertex-import-prefix string
Prefix for Vertex model namespacing (use with -vertex-import)

kodi avatar May 05 '26 07:05 kodi

@ranaroussi the upstream CLIProxyAPI seem to not support github copilot auth anymore?

ongyimeng avatar May 12 '26 11:05 ongyimeng

fixed it in hacky way with codex. here's a prompt you can use:

Patch my local VibeProxy install so GitHub Copilot login works again. The app calls cli-proxy-api-plus -github-copilot-login, but the bundled CLIProxyAPI 7.x binary no longer has that flag. Build router-for-me/CLIProxyAPI tag v6.9.2-0 for my macOS architecture, install it as ~/.local/bin/cli-proxy-api-plus-v6.9.2-0, back up /Applications/VibeProxy.app/Contents/Resources/cli-proxy-api-plus, and replace that app resource with a shell wrapper that execs the built 6.9.2-0 binary with all original args. Then smoke-test that -github-copilot-login appears in -h. Do not print or touch any OAuth tokens.

Shandelier avatar May 19 '26 14:05 Shandelier

🔧 Workaround: Restore --github-copilot-login flag in VibeProxy

The bundled cli-proxy-api-plus 7.x dropped the --github-copilot-login flag. Here is a workaround that builds the last version that had it (v6.9.2-0) and patches it into your VibeProxy install.

Quick fix (one-liner)

bash <(curl -fsSL https://gist.github.com/jellydn/e2459c1f6b49a439037c5c9d6415b973/raw/fix-vibeproxy-copilot-login.sh)

What it does

  1. Clones router-for-me/CLIProxyAPI tag v6.9.2-0 and builds the binary for your architecture.
  2. Installs the binary to ~/.local/bin/cli-proxy-api-plus-v6.9.2-0.
  3. Backs up the original 7.x binary.
  4. On systems without SIP protection: replaces the app resource in-place.
  5. On SIP-protected systems (macOS default): copies the entire app bundle to ~/.local/share/VibeProxy.app/, patches the copy, and launches from there.
  6. Smoke-tests the --github-copilot-login flag.
  7. Restarts VibeProxy.

Requirements

  • git, go (≥1.26), gh CLI (login only, optional)

Full script

https://gist.github.com/jellydn/e2459c1f6b49a439037c5c9d6415b973

Note

No OAuth tokens are touched or printed. This only swaps the binary — authentication state is fully preserved.


Upstream fix request: please re-add the --github-copilot-login flag (and the other provider-login flags) to the cli-proxy-api-plus 7.x binary so this workaround isn't needed.

jellydn avatar May 29 '26 07:05 jellydn

Root cause identified: on Apr 27 the release workflow switched the bundled backend from the now-retired CLIProxyAPIPlus fork to stock CLIProxyAPI (52abf78). The stock CLI never defined the login flag for this provider, so the bundled binary exits with flag provided but not defined. #566 adds runtime capability detection, so this button now explains the situation instead of dumping the raw Go error, plus a CI guard against future flag drift. Existing credentials are unaffected; restoring new-login support needs upstream CLIProxyAPI support (or the management-API flow being explored in #485).

ranaroussi avatar Sep 26 '26 09:09 ranaroussi