diff options
| author | Aiden Cline <[email protected]> | 2026-01-14 20:20:55 -0600 |
|---|---|---|
| committer | Aiden Cline <[email protected]> | 2026-01-14 20:21:03 -0600 |
| commit | b36837ae93ec9859de04e5df9f6c87eb7f6fce9a (patch) | |
| tree | 88dd5dc4e08e78cfb92f17a4f8b161465df1125a /packages | |
| parent | e03932e586e89cc30015e6a5006ed5e83881a05c (diff) | |
| download | opencode-b36837ae93ec9859de04e5df9f6c87eb7f6fce9a.tar.gz opencode-b36837ae93ec9859de04e5df9f6c87eb7f6fce9a.zip | |
tweak: add error message so people know to reauthenticate with copilot
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/opencode/src/plugin/index.ts | 2 | ||||
| -rw-r--r-- | packages/opencode/src/provider/transform.ts | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/packages/opencode/src/plugin/index.ts b/packages/opencode/src/plugin/index.ts index 38e757868..84de520b8 100644 --- a/packages/opencode/src/plugin/index.ts +++ b/packages/opencode/src/plugin/index.ts @@ -50,7 +50,7 @@ export namespace Plugin { for (let plugin of plugins) { // ignore old codex plugin since it is supported first party now - if (plugin.includes("opencode-openai-codex-auth")) continue + if (plugin.includes("opencode-openai-codex-auth") || plugin.includes("opencode-copilot-auth")) continue log.info("loading plugin", { path: plugin }) if (!plugin.startsWith("file://")) { const lastAtIndex = plugin.lastIndexOf("@") diff --git a/packages/opencode/src/provider/transform.ts b/packages/opencode/src/provider/transform.ts index 28e8d97ab..4acc28fbf 100644 --- a/packages/opencode/src/provider/transform.ts +++ b/packages/opencode/src/provider/transform.ts @@ -668,7 +668,10 @@ export namespace ProviderTransform { export function error(providerID: string, error: APICallError) { let message = error.message - if (providerID === "github-copilot" && message.includes("The requested model is not supported")) { + if (providerID.includes("github-copilot") && error.statusCode === 403) { + return "Please reauthenticate with the copilot provider to ensure your credentials work properly with OpenCode." + } + if (providerID.includes("github-copilot") && message.includes("The requested model is not supported")) { return ( message + "\n\nMake sure the model is enabled in your copilot settings: https://github.com/settings/copilot/features" |
