Skip to content

fix(opencode): discover Copilot API endpoint - #38004

Closed
rekram1-node wants to merge 2 commits into
devfrom
copilot-endpoint
Closed

rekram1-node wants to merge 2 commits into
devfrom
copilot-endpoint

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Summary

  • discover the account-specific Copilot API endpoint from GitHub user metadata
  • use the discovered endpoint for model discovery and static model fallbacks
  • clarify that the existing deployment prompt selects the GitHub host, not the Copilot subscription

GitHub selects api.individual.githubcopilot.com, api.business.githubcopilot.com, or api.enterprise.githubcopilot.com based on the authenticated account. Discovery falls back to the existing public or GitHub Enterprise host when metadata is unavailable.

Fixes #37976

Testing

  • bun test test/plugin/github-copilot-models.test.ts --timeout 30000
  • bun typecheck

@rekram1-node

Copy link
Copy Markdown
Collaborator Author

Closing this in favor of implementing the fix on the V2 branch. The V2 provider and auth lifecycle differs from V1, so we want to reevaluate endpoint discovery there rather than add new request-path behavior to V1 and risk destabilizing it. We'll open a fresh V2-targeted PR once that implementation is ready.

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.

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

1 participant