-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Describe the bug
When configuring the GitHub Copilot provider via the CLI or UI, the configure_provider_dialog() function prompts the user to manually enter a GITHUB_COPILOT_TOKEN via password input. However, this bypasses the OAuth device code authentication flow implemented in GithubCopilotProvider. As a result, the expected login process is never triggered during configuration.
To Reproduce
Steps to reproduce the behavior:
Run the Goose CLI or UI
Select GitHub Copilot as the provider in the configuration dialog
Observe that it prompts for a GITHUB_COPILOT_TOKEN manually
Notice that the OAuth device code flow does not initiate
Expected behavior
Instead of prompting for manual token entry, the configuration flow for GitHub Copilot should detect that the provider supports OAuth and trigger the device code login flow automatically. This behavior is already implemented and works when the provider is used during a completion request.
Screenshots
N/A
Please provide following information:
OS & Arch: macOS Sequoia 15.5 / Apple Silicon (ARM)
Interface: CLI and UI
Version: v1.0.30
Extensions enabled: [Please specify, e.g. Computer Controller, Figma, etc.]
Provider & Model: GitHub Copilot
Additional context
The OAuth flow only triggers under specific conditions:
The provider is used for a completion request
refresh_api_info() is called
No token exists in config storage
Only then does get_access_token() eventually call login() to initiate the device code flow. This logic should ideally be triggered during provider configuration for those that support it.