Skip to content

Commit c1b0732

Browse files
byapparovclaude
andcommitted
refactor(provider): remove the GitHub Copilot provider (#187)
Delete the forked Copilot OpenAI-compatible SDK, the Copilot auth plugin, and every Copilot branch in provider loading, transforms, error mapping, the auth picker and the GitHub install command. Drop the now-unused @ai-sdk/provider-utils dependency and the Copilot-only enterpriseUrl config/auth fields and COPILOT_ env substitution prefix. models.dev still lists github-copilot, so ModelsDev.get() filters it out: GITHUB_TOKEN no longer autoloads it, stored github-copilot auth entries are ignored, and a model reference to github-copilot takes the normal ModelNotFoundError path. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent f30eda8 commit c1b0732

45 files changed

Lines changed: 64 additions & 6282 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎bun.lock‎

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/cli/package.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
"dependencies": {
8383
"@agentclientprotocol/sdk": "0.14.1",
8484
"@ai-sdk/provider": "2.0.1",
85-
"@ai-sdk/provider-utils": "3.0.21",
8685
"@aictrl/plugin": "workspace:*",
8786
"@aictrl/sdk": "workspace:*",
8887
"@aictrl/util": "workspace:*",

‎packages/cli/src/auth/index.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export namespace Auth {
1313
access: z.string(),
1414
expires: z.number(),
1515
accountId: z.string().optional(),
16-
enterpriseUrl: z.string().optional(),
1716
})
1817
.meta({ ref: "OAuth" })
1918

‎packages/cli/src/cli/cmd/auth.ts‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,10 @@ export const AuthLoginCommand = cmd({
308308
const priority: Record<string, number> = {
309309
aictrl: 0,
310310
anthropic: 1,
311-
"github-copilot": 2,
312-
openai: 3,
313-
google: 4,
314-
openrouter: 5,
315-
vercel: 6,
311+
openai: 2,
312+
google: 3,
313+
openrouter: 4,
314+
vercel: 5,
316315
}
317316
const pluginProviders = resolvePluginProviders({
318317
hooks: await Plugin.list(),

‎packages/cli/src/config/config.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,6 @@ export namespace Config {
956956
.object({
957957
apiKey: z.string().optional(),
958958
baseURL: z.string().optional(),
959-
enterpriseUrl: z.string().optional().describe("GitHub Enterprise URL for copilot authentication"),
960959
setCacheKey: z.boolean().optional().describe("Enable promptCacheKey for this provider (default false)"),
961960
timeout: z
962961
.union([

‎packages/cli/src/config/paths.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export namespace ConfigPaths {
8787
"AICTRL_", "OPENCODE_",
8888
// AI provider keys (users need these in config)
8989
"ANTHROPIC_", "OPENAI_", "AZURE_", "AWS_", "GOOGLE_",
90-
"GITHUB_", "COPILOT_", "MISTRAL_", "GROQ_", "TOGETHER_",
90+
"GITHUB_", "MISTRAL_", "GROQ_", "TOGETHER_",
9191
"DEEPSEEK_", "XAI_", "COHERE_", "FIREWORKS_",
9292
"ZHIPU_", "AICORE_",
9393
// Standard system vars

‎packages/cli/src/plugin/copilot.ts‎

Lines changed: 0 additions & 327 deletions
This file was deleted.

0 commit comments

Comments
 (0)