diff --git a/changelog.d/changed-15159-mitm-cancellation-guard.md b/changelog.d/changed-15159-mitm-cancellation-guard.md new file mode 100644 index 0000000000..8936a29b95 --- /dev/null +++ b/changelog.d/changed-15159-mitm-cancellation-guard.md @@ -0,0 +1 @@ +- Remove an unreachable cancellation check from the MITM inference proxy; runtime behavior is unchanged, and the HTTP translator retains its caller-cancellation handling ([#15159](https://github.com/hivecommons/hive/pull/15159)). diff --git a/src/crux/proxy/github_proxy_inference.go b/src/crux/proxy/github_proxy_inference.go index 1d09f7db6c..be2b6e0fe2 100644 --- a/src/crux/proxy/github_proxy_inference.go +++ b/src/crux/proxy/github_proxy_inference.go @@ -684,10 +684,6 @@ func (p *GitHubProxy) handleInferenceRequest(conn net.Conn, req *http.Request, a } resp, err := client.Do(upstreamReq) if err != nil { - if errors.Is(err, context.Canceled) && errors.Is(req.Context().Err(), context.Canceled) { - p.logger.Debug("inference request canceled", "agent", agentName) - return - } p.logger.Error("inference upstream failed", "agent", agentName, "url", upstreamURL, "error", err) if p.gatewayHealth != nil { p.gatewayHealth.RecordEndpointError(route.Backend, route.Endpoint, err, time.Now())