Merge pull request #12731 from cli/babakks/fix-agent-task-api-version

fix(agent-task/capi): use a fixed CAPI API version
This commit is contained in:
Babak K. Shandiz 2026-02-20 18:14:34 +00:00 committed by GitHub
commit 9e82fc2965
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)
}