Dashboard › opencode › Distillation
ecee88d5-0ee0-4121-8b8f-64ac4ba68a94["lore_tm_v1_LKbCzWFoUNFKJKJzyAZnThtNu6mQ0F-_H_AHq7n9bFE","lore_tm_v1_1aA-n3KAsNkZbf5tGnwBE7SVz61vo0F2QzST3vxz1q8"]
/home/byk/Code/opencode-lore/packages/core/src/fetch-interceptor.ts bypasses interception for local hostnames localhost, 127.0.0.1, 0.0.0.0, ::1, and [::1], returning originalFetch(input, init).matchesLLMApiPath(upstream.pathname) use interceptUrl(upstream, gateway); 2. unmatched but LLM-like paths identified by pathLooksLLMLike(upstream.pathname) inspect extractBodyString(input, init) with detectProtocolFromBody(bodyRaw) and use interceptUrlForProtocol(upstream, gateway, detected).matchesLLMApiPath() succeeds but interceptUrl() returns no rewrite, the request passes through via originalFetch(input, init)./home/byk/Code/opencode-lore/packages/core/src/fetch-interceptor.ts call buildGatewayHeaders(input, init, rewrite.upstreamBase, rewrite.upstreamPath, config), then observeRequestHeaders(headers, config), and send originalFetch(rewrite.gatewayUrl, { ...init, headers }).fetch-interceptor: ${upstream.host}${upstream.pathname} β gateway (body-detected ${detected}).${upstream.host}${upstream.pathname} using warnedPaths; the warning says the request is bypassing the Lore gateway and suggests adding a pattern in fetch-interceptor.ts.globalThis.fetch = Object.assign(interceptor, originalFetch), preserving extra original-fetch properties such as newer Node.js preconnect; cleanup restores globalThis.fetch = originalFetch and calls writeOriginalFetchSlot(null)./home/byk/Code/opencode-v2-pilot/packages/ai/src found 73 HTTP-related matches, including Effect HTTP request construction in protocol implementations and centralized execution in route/executor.ts./home/byk/Code/opencode-v2-pilot/packages/ai/src/route/executor.ts imports FetchHttpClient, HttpClient, HttpClientError, HttpClientRequest, and HttpClientResponse; it exposes responseHttp, responseStream, and a layer requiring HttpClient.HttpClient, while fetchLayer provides FetchHttpClient.layer./home/byk/Code/opencode-v2-pilot/packages/ai/src/protocols/shared.ts constructs JSON POST requests with HttpClientRequest.post(input.url), sets content-type to application/json using Headers.set(Headers.fromInput(input.headers), ...), and applies HttpClientRequest.bodyText(input.body, "application/json").HttpClientRequest include zai-images.ts, xai-images.ts, openai-images.ts, meta-images.ts, and google-images.ts; JSON requests apply HttpClientRequest.setHeaders(...) and HttpClientRequest.bodyText(..., "application/json"), while openai-images.ts also supports HttpClientRequest.bodyFormData(form).llm.ts uses http?: HttpOptions.Input; image.ts uses both http?: HttpOptions and http?: HttpOptions.Input; route/client.ts defines StreamOptions.http?: HttpMiddleware; and transport files websocket.ts, websocket-channel.ts, and transport/index.ts use http?: HttpContext.