Skip to content

fix(copilot): use public models host for github.com#33662

Open
lin-hongkuan wants to merge 1 commit into
anomalyco:devfrom
lin-hongkuan:copilot-model-host
Open

fix(copilot): use public models host for github.com#33662
lin-hongkuan wants to merge 1 commit into
anomalyco:devfrom
lin-hongkuan:copilot-model-host

Conversation

@lin-hongkuan

Copy link
Copy Markdown

Issue for this PR

Closes #31000

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

GitHub.com Copilot OAuth auth can store enterpriseUrl: "github.com". The current Copilot base URL helper treats any enterprise URL as an enterprise host, which turns github.com into https://copilot-api.github.com.

This PR special-cases github.com to use the public Copilot API host, while preserving copilot-api.<enterprise-domain> for real enterprise domains.

How did you verify your code works?

  • bun test test/plugin/github-copilot-models.test.ts from packages/opencode
  • bun run typecheck from packages/opencode
  • git diff --check from the repo root

Screenshots / recordings

Not applicable; this is provider URL selection.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

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.

Copilot provider model-list fetch fails for github.com users — d7() constructs non-existent domain

1 participant