Skip to content

GitHub Copilot Plugin does not allow for specifying business- or enterprise-specific URLs #37976

Closed

Description

@d-m

Description

The GitHub Copilot plugin hardcodes the api.githubcopilot.com URL when not using a GitHub Enterprise Cloud instance:

return enterpriseUrl ? `https://copilot-api.${normalizeDomain(enterpriseUrl)}` : "https://api.githubcopilot.com"

GitHub provides the URLs api.business.githubcopilot.com and api.enterprise.githubcopilot.com for Business and Enterprise licenses, respectively. Many enterprise customers with a GitHub Copilot Business or GitHub Copilot Enterprise license block api.githubcopilot.com at the network level to prevent employees from using a personal GitHub Copilot license and implement subscription based networking.

This results in an inability to use OpenCode in these environments because the subscription-based URL can't be selected.

Plugins

github-copilot (built-in)

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Jul 20, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is distinct from those (e.g., specifically about selecting the business/enterprise API URL as a configurable option rather than the broader auth/endpoint issues), please clarify so maintainers can track it separately.

  2. rekram1-node commented on Jul 20, 2026

    @rekram1-node
    Collaborator

    I do not have access to these accounts, ill try to figure out how to better support those, also will happily accept prs if u can demonstrate that it in fact works

  3. opencode-agent commented on Jul 22, 2026

    @opencode-agent
    Contributor

    Addressed by #38184. V2 now discovers the account-specific Copilot API endpoint during device OAuth, stores it with the credential, and uses it for model discovery and inference. This covers Business and Enterprise subscription-specific endpoints without requiring the previously hardcoded api.githubcopilot.com URL. Closing as resolved on the v2 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions