[PR #6974] fix(tui): enable GitHub Copilot Enterprise authentication in /connect… #12186

Open
opened 2026-02-16 18:17:06 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6974

State: open
Merged: No


Problem

GitHub Copilot Enterprise authentication is missing in TUI /connect command. The CLI (auth login) supports enterprise login with deployment type selection and conditional prompts, but TUI /connect has no option for enterprise authentication at all.

Solution

Added enterprise authentication support to TUI /connect by implementing the same prompt collection logic as CLI:

  • Added prompt collection loop to gather user inputs (deployment type, enterprise URL, etc.)
  • Implemented conditional prompt logic for enterprise-specific fields
  • OAuth callback now returns actual provider ID (github-copilot-enterprise vs github-copilot)

Changes

  • dialog-provider.tsx - Added prompt collection before authorization
  • auth.ts, server.ts - Return actual provider ID from OAuth callback
  • dialog-model.tsx - Filter by provider.id instead of model.providerID
  • provider.ts - Check both regular and enterprise auth for github-copilot plugin

Testing

  • /connect with GitHub Copilot (public)
  • /connect with GitHub Copilot Enterprise
  • Enterprise models display correctly

Note: If these changes are approved, I will raise a separate PR for Desktop app support.

Before :

https://github.com/user-attachments/assets/b7c35429-771e-4443-ae0e-db90160cc12d

After :

https://github.com/user-attachments/assets/88673ad8-4bf1-4485-8fcf-9f8512ba1e72

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6974 **State:** open **Merged:** No --- ### Problem GitHub Copilot Enterprise authentication is missing in TUI `/connect` command. The CLI (`auth login`) supports enterprise login with deployment type selection and conditional prompts, but TUI `/connect` has no option for enterprise authentication at all. ### Solution Added enterprise authentication support to TUI `/connect` by implementing the same prompt collection logic as CLI: - Added prompt collection loop to gather user inputs (deployment type, enterprise URL, etc.) - Implemented conditional prompt logic for enterprise-specific fields - OAuth callback now returns actual provider ID (`github-copilot-enterprise` vs `github-copilot`) ### Changes - **dialog-provider.tsx** - Added prompt collection before authorization - **auth.ts, server.ts** - Return actual provider ID from OAuth callback - **dialog-model.tsx** - Filter by `provider.id` instead of `model.providerID` - **provider.ts** - Check both regular and enterprise auth for github-copilot plugin ### Testing - ✅ `/connect` with GitHub Copilot (public) - ✅ `/connect` with GitHub Copilot Enterprise - ✅ Enterprise models display correctly --- **Note:** If these changes are approved, I will raise a separate PR for Desktop app support. Before : https://github.com/user-attachments/assets/b7c35429-771e-4443-ae0e-db90160cc12d After : https://github.com/user-attachments/assets/88673ad8-4bf1-4485-8fcf-9f8512ba1e72
yindo added the pull-request label 2026-02-16 18:17:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12186