summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2026-04-02 10:53:08 -0500
committerGitHub <[email protected]>2026-04-02 10:53:08 -0500
commit10ca1ace6be73ee79d932697df3d6c8e2af78260 (patch)
treef54a3ff4ac76000b38d48f6be465f7bad542e802
parentc3dfd08ba8c0378398b598b676c4664b98dd28de (diff)
downloadopencode-10ca1ace6be73ee79d932697df3d6c8e2af78260.tar.gz
opencode-10ca1ace6be73ee79d932697df3d6c8e2af78260.zip
tweak: add abort signal timeout to the github copilot model fetch to prevent infinite blocking (#20705)
-rw-r--r--packages/opencode/src/plugin/github-copilot/models.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/opencode/src/plugin/github-copilot/models.ts b/packages/opencode/src/plugin/github-copilot/models.ts
index 6cbb17fe9..b6b27d034 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<Record<string, Model>> {
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}`)