fix(oauth): mirror ghe-copilot into the OAuth id map and MITM host list

#7546 registered the ghe-copilot provider in src/lib/oauth/providers/index.ts but
left it out of two mirrors that are asserted to stay in lock-step:

- PROVIDERS in src/lib/oauth/constants/oauth.ts (the canonical id map), which made
  oauth-providers-config.test.ts fail three assertions at once;
- MITM_TOOL_HOSTS, the client-safe projection of ALL_TARGETS, which made
  mitm-tool-hosts.test.ts fail its drift guard.

Both reds reproduce on the pure release tip and turned every open PR's unit shards
red, so this unblocks the whole queue. The test expectations are extended (not
weakened) to cover the new provider.
This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-07-20 06:52:05 -03:00
parent eb02d4d266
commit 764d91fdfa
4 changed files with 10 additions and 0 deletions

View File

@@ -511,6 +511,7 @@ export const PROVIDERS = {
KIMI_CODING: "kimi-coding",
OPENAI: "openai",
GITHUB: "github",
GHE_COPILOT: "ghe-copilot",
GITLAB_DUO: "gitlab-duo",
KIRO: "kiro",
AMAZON_Q: "amazon-q",

View File

@@ -17,6 +17,9 @@ export const MITM_TOOL_HOSTS: Record<string, string[]> = {
],
kiro: ["api.anthropic.com"],
copilot: ["api.githubcopilot.com", "copilot-proxy.githubusercontent.com"],
// GHE Copilot has no fixed host: the enterprise domain is per-connection (gheUrl), so the
// canonical target declares an empty host list and nothing is added to the hosts file.
"ghe-copilot": [],
codex: ["chatgpt.com"],
cursor: ["api2.cursor.sh"],
zed: ["api.zed.dev"],