Skip to content

Ability to set the Copilot-Integration-Id header for github-copilot provider #2471

Description

@elgreco247

What you'd like to see

If you use a Personal Access Token (PAT) as your GITHUB_TOKEN and then try to use a github-copilot model, you will get a Bad Request response with the following error message:
Personal Access Tokens are not supported for this endpoint

This does not happen when the header Copilot-Integration-Id is set to the value copilot-developer-cli.

It would be nice if one could set the value of this header in the provider_opts object for github-copilot.

Why you'd like to see it

So that I can use my PAT when working with github-copilot models.

Workarounds?

Use a local models gateway.

Activity

  1. self-assigned this
    on Apr 21, 2026
  2. dgageot commented on Apr 21, 2026

    @dgageot
    Member

    @elgreco247 could you give a try to #2475?

  3. elgreco247 commented on Apr 21, 2026

    @elgreco247
    Author

    It worked when explicitly setting the copilot-integration-id value to copilot-developer-cli in the agent YAML file (the default value vscode-chat didn't work for me).

    When switching copilot models in an interactive session, you still get the 400 responses; maybe this wouldn't be the case if it was possible to define the default value of copilot-integration-id with an environment variable or via user config?

  4. added
    area/providers
    area/providers/openai
    kind/feat
    on May 27, 2026
  5. removed
    kind/feat
    on Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/providersarea/providers/openai

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions