---
title: GitHub Copilot subscription support
description: Bring each caller's own GitHub Copilot plan to Copilot through Unity Gateway. Unity Gateway passes each caller's GitHub sign-in and stores no credential.
canonical_url: https://docs.databricks.com/aws/en/ai-gateway/github-copilot-subscription-support
---

# GitHub Copilot subscription support

Bring your own GitHub Copilot plan to Copilot through Unity Gateway. Requests are billed to each caller's Copilot plan, and Unity Gateway governs access, the models callers can use, and usage.

Unity Gateway doesn't store a credential. It passes each caller's own GitHub sign-in to GitHub Copilot. This page explains how to set up the model provider service and how the connection works. To connect Copilot as a user, see [Use your own GitHub Copilot subscription](https://docs.databricks.com/aws/en/ai-gateway/coding-agent-copilot.md#bring-your-own-subscription).

## How GitHub Copilot subscription support works

When Copilot uses a GitHub Copilot subscription model provider service:

* Copilot stays signed in to GitHub. Its model requests, model list, and automatic model selection go through Unity Gateway.
* Unity Gateway passes the caller's GitHub sign-in to GitHub Copilot on each request and doesn't store it.
* `ug` adds the caller's Databricks credentials to each request so that Unity Gateway can authenticate the caller.
* Copilot's model picker shows only the models that the service allows.
* Copilot's other calls, such as the GitHub MCP server, sign-in, and account features, go directly to GitHub. They don't pass through Unity Gateway.

## Requirements

* **To create the service:** `CREATE SERVICE` on the schema where you create the model provider service, plus `USE CATALOG` and `USE SCHEMA` on its catalog and schema.
* **To use the service:**
  * A GitHub Copilot Free, Pro, Pro+, Business, or Enterprise plan. Sign in to Copilot with your GitHub account, or with a fine-grained personal access token that has the Copilot Requests permission. Classic personal access tokens (`ghp_`) aren't supported.
  * The [Unity Gateway CLI](https://docs.databricks.com/aws/en/ai-gateway/coding-agent-quickstart.md) (`ug`) on your device. Copilot can't send Databricks credentials with its GitHub sign-in, so `ug` adds them.

## Create a model provider service

Register the connection one time as a [model provider service](https://docs.databricks.com/aws/en/ai-gateway/model-provider-services.md):

1. Follow the steps in [Create and manage providers](https://docs.databricks.com/aws/en/ai-gateway/create-model-provider-services.md#subscription-auth).
2. For the provider type, select **GitHub Copilot**. The only authentication mode is **GitHub Copilot subscription**.
3. Select the GitHub Copilot models that callers can use, or allow all models. Callers see only these models in Copilot's model picker.
4. Use Unity Catalog privileges to control who can use the service.

The service doesn't store a credential. Each caller signs in with their own GitHub Copilot plan.

## <a id="connect-copilot" />Connect a coding agent

After the service exists, each user connects GitHub Copilot to it and signs in to GitHub. See [Use your own GitHub Copilot subscription](https://docs.databricks.com/aws/en/ai-gateway/coding-agent-copilot.md#bring-your-own-subscription).

## <a id="revoke-access" />Revoke a GitHub sign-in

Unity Gateway doesn't store GitHub sign-ins, so you revoke them at GitHub:

* To sign out of Copilot CLI, enter `/logout`.
* To revoke the authorization, go to **Applications** in your GitHub account settings and revoke the GitHub Copilot authorization you signed in with under **Authorized OAuth Apps** or **Authorized GitHub Apps**. If you signed in with a personal access token, delete the token instead.

If you think a GitHub sign-in was exposed, revoke it at GitHub first, then sign in again. To stop a user's requests through Unity Gateway, an admin can revoke their `EXECUTE` privilege on the model provider service.

## <a id="troubleshooting" />Troubleshooting

* **Copilot says to sign in to GitHub Copilot:** Copilot isn't signed in to GitHub. In Copilot CLI, enter `/login`. In Visual Studio Code, open Chat and sign in to GitHub Copilot. In the GitHub Copilot app, sign in to GitHub.
* **`Databricks sign-in expired`:** Run `databricks auth login --host <workspace-url>`, then restart `ug copilot`.
* **`Unity Gateway couldn't find your GitHub Copilot API host`:** Sign in to GitHub Copilot again, then restart Copilot.
* **A model request is denied:** The model provider service doesn't allow that model, or you don't have `EXECUTE` on the service. Choose another model in the model picker, or ask your admin for access.
* **The GitHub Copilot app says its GitHub Copilot models aren't going through Unity Gateway:** Your device's proxy settings stop the app from reaching `ug`, so the app sends requests directly to GitHub. See [Limitations](https://docs.databricks.com/aws/en/ai-gateway/github-copilot-subscription-support.md#limitations).
* **`ug` warns about Copilot's `copilotUrl` setting:** A `copilotUrl` in Copilot's `settings.json` can send Copilot's calls around Unity Gateway. Remove it.

## <a id="limitations" />Limitations

* Requests are billed to the caller's GitHub Copilot plan and are subject to that plan's limits.
* The model provider service doesn't store a credential, so it only serves requests that include a caller's GitHub sign-in.
* A session that uses your GitHub Copilot subscription offers only GitHub Copilot models. To use Databricks models, run `ug configure` and choose **Databricks Hosted** for GitHub Copilot.
* In Visual Studio Code, only Copilot sessions use the service. Local sessions and Visual Studio Code's own background requests, such as chat titles, go directly to GitHub.
* In the GitHub Copilot app, chats go directly to GitHub if your device uses a proxy auto-configuration (PAC) file, proxy auto-discovery, or a proxy that doesn't exclude `127.0.0.1` and `localhost`. The app shows a warning in the chat.
* [Service policies](https://docs.databricks.com/aws/en/ai-gateway/govern-model-provider-services.md) apply to model requests. They don't apply to Copilot's model list or automatic model selection.

## Additional resources

| Resource                                                                                                                                                            | Description                                                                                      |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| [Connect GitHub Copilot](https://docs.databricks.com/aws/en/ai-gateway/coding-agent-copilot.md)                                                                     | Connect Copilot CLI, Copilot in Visual Studio Code, and the GitHub Copilot app to Unity Gateway. |
| [Discover and govern access to external model providers (model provider services)](https://docs.databricks.com/aws/en/ai-gateway/govern-model-provider-services.md) | Control which models callers can use and apply service policies.                                 |
