From 10ca1ace6be73ee79d932697df3d6c8e2af78260 Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Thu, 2 Apr 2026 10:53:08 -0500 Subject: [PATCH] tweak: add abort signal timeout to the github copilot model fetch to prevent infinite blocking (#20705) --- packages/opencode/src/plugin/github-copilot/models.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/opencode/src/plugin/github-copilot/models.ts b/packages/opencode/src/plugin/github-copilot/models.ts index 6cbb17fe9a..b6b27d0340 100644 --- a/packages/opencode/src/plugin/github-copilot/models.ts +++ b/packages/opencode/src/plugin/github-copilot/models.ts @@ -112,6 +112,7 @@ export namespace CopilotModels { ): Promise> { const data = await fetch(`${baseURL}/models`, { headers, + signal: AbortSignal.timeout(5_000), }).then(async (res) => { if (!res.ok) { throw new Error(`Failed to fetch models: ${res.status}`)