GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(core): disable Bun's fetch idle timeout for provider requests (#5… · anomalyco/opencode@460c626

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/core/src/effect
    • app-node-platform.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/core/src/effect/app-node-platform.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/effect/app-node-platform.ts
+15-1Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
import { LLMClient, RequestExecutor } from "@opencode/ai/route"
2+
import { Effect, Layer } from "effect"
3+
import { FetchHttpClient, HttpClient } from "effect/http"
24
import { Socket } from "effect/socket"
35
import { makeGlobalNode } from "@opencode/util/effect/app-node"
46
import { httpClient } from "@opencode/util/effect/app-node-platform"
57
import { WebSocketConstructor } from "./websocket-constructor.js"
68

9+
// Bun's fetch ends a request after five quiet minutes, before provider routes' own header and chunk timeouts.
10+
const withoutBunTimeout = Layer.effect(
11+
HttpClient.HttpClient,
12+
Effect.gen(function* () {
13+
const client = yield* HttpClient.HttpClient
14+
return HttpClient.transformResponse(
15+
client,
16+
Effect.provideService(FetchHttpClient.RequestInit, { timeout: false } as BunFetchRequestInit),
17+
)
18+
}),
19+
)
20+
721
export const requestExecutor = makeGlobalNode({
822
service: RequestExecutor.Service,
9-
layer: RequestExecutor.layer,
23+
layer: RequestExecutor.layer.pipe(Layer.provide(withoutBunTimeout)),
1024
deps: [httpClient],
1125
})
1226

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.