GitHub Copilot Enterprise Models Broken #3302

Closed
opened 2026-02-16 17:39:35 -05:00 by yindo · 4 comments
Owner

Originally created by @justmejulian on GitHub (Dec 4, 2025).

Originally assigned to: @thdxr on GitHub.

Description

GitHub Copilot Enterprise provider fails to initialize after following the troubleshooting steps for re-authentication. The provider was working previously but now throws a ProviderInitError when attempting to run any commands.

OpenCode version

1.0.132

Steps to reproduce

  1. Logout from GitHub Copilot Enterprise:
opencode auth logout
# Selected: github-copilot-enterprise (oauth)
  1. Clear opencode data directories as per [troubleshooting docs](https://opencode.ai/docs/troubleshooting/#provideriniterror):
rm -rf ~/.local/share/opencode
rm -rf ~/.cache/opencode
  1. Re-authenticate with GitHub Copilot Enterprise:
opencode auth login
# Selected: GitHub Copilot > GitHub Enterprise
# Entered GitHub Enterprise URL
# Completed device flow authentication successfully
  1. Set default model in ~/.config/opencode/opencode.json
`"model": "github-copilot-enterprise/gpt-4.1"`
  1. Attempt to run a command (or ask question in opencode):
opencode run "test"

Application crashes with ProviderInitError:

ProviderInitError: ProviderInitError
 data: {
  providerID: "github-copilot",
},
      at getSDK (src/provider/provider.ts:786:13)

TypeError: undefined is not an object (evaluating 'provider.options')
      at getSDK (src/provider/provider.ts:712:28)

Logs

Full log output:

opencode run "test"

Application crashes with ProviderInitError:

ProviderInitError: ProviderInitError
 data: {
  providerID: "github-copilot",
},
      at getSDK (src/provider/provider.ts:786:13)

TypeError: undefined is not an object (evaluating 'provider.options')
      at getSDK (src/provider/provider.ts:712:28)

Screenshot and/or share link

No response

Operating System

macos 26.1

Terminal

Ghostty

Originally created by @justmejulian on GitHub (Dec 4, 2025). Originally assigned to: @thdxr on GitHub. ### Description GitHub Copilot Enterprise provider fails to initialize after following the troubleshooting steps for re-authentication. The provider was working previously but now throws a `ProviderInitError` when attempting to run any commands. ### OpenCode version 1.0.132 ### Steps to reproduce 1. Logout from GitHub Copilot Enterprise: ```bash opencode auth logout # Selected: github-copilot-enterprise (oauth) ``` 2. Clear opencode data directories as per [[troubleshooting docs](https://opencode.ai/docs/troubleshooting/#provideriniterror)](https://opencode.ai/docs/troubleshooting/#provideriniterror): ```bash rm -rf ~/.local/share/opencode rm -rf ~/.cache/opencode ``` 3. Re-authenticate with GitHub Copilot Enterprise: ```bash opencode auth login # Selected: GitHub Copilot > GitHub Enterprise # Entered GitHub Enterprise URL # Completed device flow authentication successfully ``` 4. Set default model in ~/.config/opencode/opencode.json ``` `"model": "github-copilot-enterprise/gpt-4.1"` ``` 4. Attempt to run a command (or ask question in opencode): ```bash opencode run "test" ``` Application crashes with `ProviderInitError`: ``` ProviderInitError: ProviderInitError data: { providerID: "github-copilot", }, at getSDK (src/provider/provider.ts:786:13) TypeError: undefined is not an object (evaluating 'provider.options') at getSDK (src/provider/provider.ts:712:28) ``` ## Logs Full log output: ``` opencode run "test" ``` Application crashes with `ProviderInitError`: ``` ProviderInitError: ProviderInitError data: { providerID: "github-copilot", }, at getSDK (src/provider/provider.ts:786:13) TypeError: undefined is not an object (evaluating 'provider.options') at getSDK (src/provider/provider.ts:712:28) ``` ### Screenshot and/or share link _No response_ ### Operating System macos 26.1 ### Terminal Ghostty
yindo added the bug label 2026-02-16 17:39:35 -05:00
yindo closed this issue 2026-02-16 17:39:35 -05:00
Author
Owner

@rekram1-node commented on GitHub (Dec 4, 2025):

Is it still broken on latest?

@rekram1-node commented on GitHub (Dec 4, 2025): Is it still broken on latest?
Author
Owner

@justmejulian commented on GitHub (Dec 5, 2025):

Yes 🙃

❯ opencode -v
1.0.133

❯ opencode auth logout

❯ rm -rf ~/.local/share/opencode
rm -rf ~/.cache/opencode

❯ opencode auth login

┌  Add credential
│
◇  Select provider
│  GitHub Copilot
│
◇  Select GitHub deployment type
│  GitHub Enterprise
│
◇  Enter your GitHub Enterprise URL or domain
│  https://xxx.ghe.com/
│
●  Go to: https://xxx.ghe.com/login/device
│
●  Enter code: ......
│
◇  Login successful
│
└  Done

❯ opencode run "test"
794 |         ...options,
795 |       })
796 |       s.sdk.set(key, loaded)
797 |       return loaded as SDK
798 |     } catch (e) {
799 |       throw new InitError({ providerID: model.providerID }, { cause: e })
                  ^
ProviderInitError: ProviderInitError
 data: {
  providerID: "github-copilot",
},

      at getSDK (src/provider/provider.ts:799:13)

720 |       using _ = log.time("getSDK", {
721 |         providerID: model.providerID,
722 |       })
723 |       const s = await state()
724 |       const provider = s.providers[model.providerID]
725 |       const options = { ...provider.options }
                                 ^
TypeError: undefined is not an object (evaluating 'provider.options')
      at getSDK (src/provider/provider.ts:725:28)
@justmejulian commented on GitHub (Dec 5, 2025): Yes 🙃 ``` ❯ opencode -v 1.0.133 ❯ opencode auth logout ❯ rm -rf ~/.local/share/opencode rm -rf ~/.cache/opencode ❯ opencode auth login ┌ Add credential │ ◇ Select provider │ GitHub Copilot │ ◇ Select GitHub deployment type │ GitHub Enterprise │ ◇ Enter your GitHub Enterprise URL or domain │ https://xxx.ghe.com/ │ ● Go to: https://xxx.ghe.com/login/device │ ● Enter code: ...... │ ◇ Login successful │ └ Done ❯ opencode run "test" 794 | ...options, 795 | }) 796 | s.sdk.set(key, loaded) 797 | return loaded as SDK 798 | } catch (e) { 799 | throw new InitError({ providerID: model.providerID }, { cause: e }) ^ ProviderInitError: ProviderInitError data: { providerID: "github-copilot", }, at getSDK (src/provider/provider.ts:799:13) 720 | using _ = log.time("getSDK", { 721 | providerID: model.providerID, 722 | }) 723 | const s = await state() 724 | const provider = s.providers[model.providerID] 725 | const options = { ...provider.options } ^ TypeError: undefined is not an object (evaluating 'provider.options') at getSDK (src/provider/provider.ts:725:28) ```
Author
Owner

@rekram1-node commented on GitHub (Dec 5, 2025):

ugh sorry will fix

@rekram1-node commented on GitHub (Dec 5, 2025): ugh sorry will fix
Author
Owner

@justmejulian commented on GitHub (Dec 5, 2025):

Could it be that providerID: "github-copilot" is wrong?
Because I am using "github-copilot-enterprise"

@justmejulian commented on GitHub (Dec 5, 2025): Could it be that `providerID: "github-copilot"` is wrong? Because I am using `"github-copilot-enterprise"`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3302