Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

fix(agent-task/capi): use a fixed CAPI API version#12731

Merged
babakks merged 1 commit intotrunkcli/cli:trunkfrom
babakks/fix-agent-task-api-versioncli/cli:babakks/fix-agent-task-api-versionCopy head branch name to clipboard
Feb 20, 2026
Merged

fix(agent-task/capi): use a fixed CAPI API version#12731
babakks merged 1 commit intotrunkcli/cli:trunkfrom
babakks/fix-agent-task-api-versioncli/cli:babakks/fix-agent-task-api-versionCopy head branch name to clipboard

Conversation

@babakks
Copy link
Member

@babakks babakks commented Feb 20, 2026

Fixes #12729
Fixes #12730

Signed-off-by: Babak K. Shandiz <babakks@github.com>
Copilot AI review requested due to automatic review settings February 20, 2026 18:06
@babakks babakks requested a review from a team as a code owner February 20, 2026 18:06
@babakks babakks requested a review from BagToad February 20, 2026 18:07
@babakks babakks enabled auto-merge February 20, 2026 18:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request attempts to fix an issue with API versioning in the CAPI (Copilot API) client by setting a fixed API version header when making requests to the Copilot API. The change modifies the capiTransport.RoundTrip method to set the X-GitHub-Api-Version header to "2026-01-09" when requests are directed to api.githubcopilot.com.

Changes:

  • Added logic to set X-GitHub-Api-Version header to "2026-01-09" for requests to the Copilot API host

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing article 'a' in the comment. The phrase should be "This is a quick fix" rather than "This is quick fix".

Suggested change
// This is quick fix to ensure that we are not using GitHub API versions while targeting CAPI.
// This is a quick fix to ensure that we are not using GitHub API versions while targeting CAPI.

Copilot uses AI. Check for mistakes.
pkg/cmd/agent-task/capi/client.go Show resolved Hide resolved
@babakks babakks merged commit 9e82fc2 into trunk Feb 20, 2026
29 checks passed
@babakks babakks deleted the babakks/fix-agent-task-api-version branch February 20, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gh agent-task create fails with 'invalid apiVersion' error Invalid apiVersion for agent-task commands

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.