Generated via Copilot on behalf of @krukow
Summary
Deferred from the v1.0.1 → v1.0.4 upstream sync (@github/copilot 1.0.63 → 1.0.65). The upstream Node.js SDK added an entire HTTP/WebSocket request-handler subsystem for BYOK providers that the runtime can drive over JSON-RPC. This is large, self-contained, and best landed as its own follow-up PR rather than bundled with the smaller config/spec changes in the v1.0.4 sync.
What upstream added
A new ~818-line copilotRequestHandler.ts implementing bidirectional streaming for LLM inference requests proxied from the runtime to the SDK client:
- Buffered + SSE HTTP request/response forwarding.
- WebSocket frame forwarding.
- Dispatched runtime → client over JSON-RPC:
llmInference.setProvider, LlmInferenceHttpRequestStart / Chunk, HttpResponseStart / Chunk, error / end-of-stream notifications, and WS frame messages.
Upstream PRs:
Python ships the equivalent via httpx + websockets.
Why it's deferred
The Clojure SDK currently has no HTTP or WebSocket client dependency wired in. An idiomatic port needs:
- A streaming HTTP client (buffered + SSE) — likely
core.async channels for chunk delivery.
- A WebSocket client for frame forwarding.
- Request cancellation / lifecycle management tied to session teardown.
- New inbound JSON-RPC handlers in
setup-request-handler! following the permission-handler precedent.
- Specs +
register-fdef! entries for any new public surface.
This is marked @experimental upstream, so there's no parity-breakage risk in shipping it separately.
Scope checklist (for the follow-up PR)
References
Summary
Deferred from the
v1.0.1 → v1.0.4upstream sync (@github/copilot1.0.63 → 1.0.65). The upstream Node.js SDK added an entire HTTP/WebSocket request-handler subsystem for BYOK providers that the runtime can drive over JSON-RPC. This is large, self-contained, and best landed as its own follow-up PR rather than bundled with the smaller config/spec changes in the v1.0.4 sync.What upstream added
A new ~818-line
copilotRequestHandler.tsimplementing bidirectional streaming for LLM inference requests proxied from the runtime to the SDK client:llmInference.setProvider,LlmInferenceHttpRequestStart/Chunk,HttpResponseStart/Chunk, error / end-of-stream notifications, and WS frame messages.Upstream PRs:
Python ships the equivalent via
httpx+websockets.Why it's deferred
The Clojure SDK currently has no HTTP or WebSocket client dependency wired in. An idiomatic port needs:
core.asyncchannels for chunk delivery.setup-request-handler!following the permission-handler precedent.register-fdef!entries for any new public surface.This is marked
@experimentalupstream, so there's no parity-breakage risk in shipping it separately.Scope checklist (for the follow-up PR)
http-kit,hato/java.net.http,gniazdo/Jetty WS).llmInference.setProviderregistration.core.async.doc/auth/byok.md, API.md) + CHANGELOG.References
nodejs/src/copilotRequestHandler.tspython/copilot/