# copilot_chat: Support data-resident GitHub Enterprise \(\#63128\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/fdfd00e44ef6392c4afc3c62e09fc6eccfde91b3)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: fdfd00e44ef6392c4afc3c62e09fc6eccfde91b3

Requested commit: fdfd00e44ef6392c4afc3c62e09fc6eccfde91b3

Commit: fdfd00e44ef6392c4afc3c62e09fc6eccfde91b3

Tree: 8c911e1a2764f470e8290109faf5e9f6ee6ed165

Author: Bennet Bo Fenner

Committer: GitHub

## Message

```
copilot_chat: Support data-resident GitHub Enterprise (#63128)

GitHub Enterprise Cloud with Data Residency requires API requests to use
the tenant-specific `api.<subdomain>.ghe.com` hostname. Copilot Chat
previously treated configured enterprise hosts like GHES, which produced
an unsupported `/api/graphql` URL, and stored all OAuth credentials
under the same GitHub.com key.

Use the GHE.com API hostname shape for configured enterprise tenants and
scope stored credentials by GitHub hostname. Changing the configured
host now clears active authentication state and loads credentials for
the new tenant, with guards against stale asynchronous loads.

Enterprise endpoint discovery failures are now surfaced instead of
silently falling back to the public Copilot endpoint. GitHub.com retains
its existing endpoint and fallback behavior.

Release Notes:

- Fixed GitHub Copilot Chat authentication and API routing for GitHub
Enterprise Cloud
```

## Parents

- [99b0ed6b55017fe110557af7408afff9a6cd9e71](https://git.cafe/gitcafe/zed/commit/99b0ed6b55017fe110557af7408afff9a6cd9e71?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/fdfd00e44ef6392c4afc3c62e09fc6eccfde91b3?format=markdown)
