diff options
| author | Paulo Edgar Castro <[email protected]> | 2025-10-25 18:08:27 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-10-25 12:08:27 -0500 |
| commit | ae62bc8b1fce194ae99a05251ed4bf85e38acc32 (patch) | |
| tree | 917dc4bd2ff6093034b35db5d69baf7e0804c225 | |
| parent | 187a5fe301657ad6823fb39fce09fef468ef5dbe (diff) | |
| download | opencode-ae62bc8b1fce194ae99a05251ed4bf85e38acc32.tar.gz opencode-ae62bc8b1fce194ae99a05251ed4bf85e38acc32.zip | |
fix: timeout param that allows user to disable provider timeout (#3443)
| -rw-r--r-- | packages/opencode/src/provider/provider.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/opencode/src/provider/provider.ts b/packages/opencode/src/provider/provider.ts index 7c40955dc..b2f2e5d40 100644 --- a/packages/opencode/src/provider/provider.ts +++ b/packages/opencode/src/provider/provider.ts @@ -422,14 +422,14 @@ export namespace Provider { const modPath = provider.id === "google-vertex-anthropic" ? `${installedPath}/dist/anthropic/index.mjs` : installedPath const mod = await import(modPath) - if (options["timeout"] !== undefined) { + if (options["timeout"] !== undefined && options["timeout"] !== null) { // Only override fetch if user explicitly sets timeout options["fetch"] = async (input: any, init?: BunFetchRequestInit) => { const { signal, ...rest } = init ?? {} const signals: AbortSignal[] = [] if (signal) signals.push(signal) - signals.push(AbortSignal.timeout(options["timeout"])) + if (options["timeout"] !== false) signals.push(AbortSignal.timeout(options["timeout"])) const combined = signals.length > 1 ? AbortSignal.any(signals) : signals[0] |
