From 4681b40e702d7e93c011f28246cb16eaec2f3c03 Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Fri, 20 Feb 2026 18:04:12 +0000 Subject: [PATCH] fix(agent-task/capi): fix capi API version Signed-off-by: Babak K. Shandiz --- pkg/cmd/agent-task/capi/client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/cmd/agent-task/capi/client.go b/pkg/cmd/agent-task/capi/client.go index 38f48e777..af618f4ce 100644 --- a/pkg/cmd/agent-task/capi/client.go +++ b/pkg/cmd/agent-task/capi/client.go @@ -62,6 +62,9 @@ func (ct *capiTransport) RoundTrip(req *http.Request) (*http.Response, error) { // ID only when performing requests to the Copilot API. if req.URL.Host == capiHost { req.Header.Add("Copilot-Integration-Id", "copilot-4-cli") + + // This is quick fix to ensure that we are not using GitHub API versions while targeting CAPI. + req.Header.Set("X-GitHub-Api-Version", "2026-01-09") } return ct.rp.RoundTrip(req) }