Skip to content

Commit 216df31

Browse files
guntripJarylWcheshire137myarb
authored
Bring your own key for Copilot (Public preview) (#58549)
Co-authored-by: Jaryl <jarylw@github.com> Co-authored-by: Sarah Vessels <82317+cheshire137@users.noreply.github.com> Co-authored-by: Melanie Yarbrough <11952755+myarb@users.noreply.github.com>
1 parent c49ee41 commit 216df31

File tree

16 files changed

+179
-1
lines changed

16 files changed

+179
-1
lines changed
95.1 KB
Loading
70.2 KB
Loading

content/copilot/how-tos/administer-copilot/manage-for-enterprise/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ children:
1313
- /manage-agents
1414
- /manage-spark
1515
- /view-usage-and-adoption
16+
- /use-your-own-api-keys
1617
redirect_from:
1718
- /copilot/managing-copilot/managing-copilot-for-your-enterprise
1819
- /copilot/how-tos/administer/enterprises
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: Using your LLM provider API keys with Copilot
3+
shortTitle: Use your own API keys
4+
intro: 'Learn how to integrate your preferred custom models with {% data variables.product.prodname_copilot %} by using your own LLM API keys, and make them available for organizations in your enterprise account.'
5+
versions:
6+
feature: copilot-byok
7+
topics:
8+
- Copilot
9+
contentType: how-tos
10+
allowTitleToDifferFromFilename: true
11+
---
12+
13+
{% data reusables.copilot.byok-intro %}
14+
15+
## Why bring your own API keys?
16+
17+
As an enterprise owner, you may have specific requirements for governance, data security, and compliance. Setting up your own API keys allows you to address:
18+
19+
{% data reusables.copilot.byok-why %}
20+
21+
## Adding your key to an enterprise account
22+
23+
> [!IMPORTANT] We highly recommend adhering to the principle of least privilege by assigning only the minimum necessary scopes to your API keys.
24+
25+
After you've added your key and selected one or more models, you and members of your organizations will be able to use them with {% data variables.copilot.copilot_byok_supported_features %}. Your models will appear at the bottom of the model picker, under the enterprise name.
26+
27+
{% data reusables.enterprise-accounts.access-enterprise %}
28+
{% data reusables.enterprise-accounts.ai-controls-tab %}
29+
1. In the sidebar, click **{% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %}**.
30+
1. Click **Configure allowed models**.
31+
{% data reusables.copilot.byok-add %}
32+
33+
## Managing availability of custom models in your organizations
34+
35+
You can choose whether the models you have added are available to organizations in your enterprise account.
36+
37+
{% data reusables.enterprise-accounts.access-enterprise %}
38+
{% data reusables.enterprise-accounts.ai-controls-tab %}
39+
1. In the sidebar, click **{% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %}**.
40+
1. Click **Configure allowed models**.
41+
1. Click the **Custom models** tab.
42+
1. Above the list of API keys, click the **Added models** tab.
43+
1. Next to a model, click **Configure**. If any organizations already have access to the model, instead of "Configure", you will need to click **All organizations** or **X organizations**.
44+
1. In the modal that opens, click the **Access** tab.
45+
>[!NOTE] The model must be set to 'Enabled' before the "Access" tab will be available.
46+
1. Choose how the model should be made available to organizations:
47+
* To make the model available to all organizations in your enterprise account, select **Allow for all organizations**.
48+
* To only make the model available for specific organizations, select **Choose per organization**, and check or uncheck the organizations listed below.
49+
1. Click **Save**.
50+
51+
## Further reading
52+
53+
* [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-organization/use-your-own-api-keys) in our documentation for organizations.
54+
* [AUTOTITLE](/copilot/concepts/chat)

content/copilot/how-tos/administer-copilot/manage-for-organization/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ children:
1919
- /add-copilot-coding-agent
2020
- /prepare-for-custom-agents
2121
- /review-activity
22+
- /use-your-own-api-keys
2223
contentType: how-tos
2324
---
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: Using your LLM provider API keys with Copilot
3+
shortTitle: Use your own API keys
4+
intro: 'Learn how to integrate your preferred custom models with {% data variables.product.prodname_copilot %} by using your own LLM API keys, and make them available to your organization members.'
5+
versions:
6+
feature: copilot-byok
7+
topics:
8+
- Copilot
9+
contentType: how-tos
10+
allowTitleToDifferFromFilename: true
11+
---
12+
13+
{% data reusables.copilot.byok-intro %}
14+
15+
## Why bring your own API keys?
16+
17+
As an organization owner, you may have specific requirements for governance, data security, and compliance. Setting up your own API keys allows you to address:
18+
19+
{% data reusables.copilot.byok-why %}
20+
21+
## Adding your key to an organization account
22+
23+
> [!IMPORTANT] We highly recommend adhering to the principle of least privilege by assigning only the minimum necessary scopes to your API keys.
24+
25+
After you've added your key and selected one or more models, you and your organization members will be able to use them with {% data variables.copilot.copilot_byok_supported_features %}. Your models will appear at the bottom of the model picker, under the organization name.
26+
27+
{% data reusables.profile.access_org %}
28+
{% data reusables.profile.org_settings %}
29+
1. In the sidebar, under "Code, planning, and automation", click **{% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %}**.
30+
1. Under "Copilot", click **Models**.
31+
{% data reusables.copilot.byok-add %}
32+
33+
## Further reading
34+
35+
* [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-enterprise/use-your-own-api-keys) in our documentation for enterprise accounts.
36+
* [AUTOTITLE](/copilot/concepts/chat)

content/copilot/how-tos/use-ai-models/configure-access-to-ai-models.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ redirect_from:
1212
- /copilot/how-tos/ai-models/configure-access-to-ai-models
1313
- /github-models/use-github-models/integrating-ai-models-into-your-development-workflow
1414
contentType: how-tos
15-
category:
15+
category:
1616
- Configure Copilot
1717
---
1818

@@ -47,3 +47,9 @@ You can enable access in two ways:
4747
As an enterprise or organization owner, you can enable or disable access to AI models for everyone who has been assigned a {% data variables.copilot.copilot_enterprise_short %} or {% data variables.copilot.copilot_business_short %} seat through your enterprise or organization. See [AUTOTITLE](/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization) and [AUTOTITLE](/copilot/managing-copilot/managing-copilot-for-your-enterprise/managing-policies-and-features-for-copilot-in-your-enterprise).
4848

4949
> [!NOTE] Models available in {% data variables.copilot.copilot_auto_model_selection %} will follow the policies set for an organization or enterprise. See [AUTOTITLE](/copilot/concepts/auto-model-selection).
50+
51+
{% ifversion copilot-byok %}
52+
53+
You can also integrate your preferred custom models from supported LLM providers by bringing your own API keys. Organization owners can make custom models available for members of their organization and enterprise owners can add custom models and choose which organizations can make use of them. See [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-organization/use-your-own-api-keys) for organizations and [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-enterprise/use-your-own-api-keys) for enterprise accounts.
54+
55+
{% endif %}

content/copilot/responsible-use/chat-in-github.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ Depending on the question you ask, {% data variables.copilot.copilot_chat %} can
149149

150150
When leveraging Bing, {% data variables.product.prodname_copilot_short %} will use the content of your prompt, as well as additional available context, to generate a Bing search query on your behalf that is sent to the Bing Search API. {% data variables.product.prodname_copilot_short %} will provide a link to the search results with its response. The search query sent to Bing is governed by [Microsoft's Privacy Statement](https://privacy.microsoft.com/en-us/privacystatement).
151151

152+
{% data reusables.rai.copilot.byok-transparency-note %}
153+
152154
## Next steps
153155

154156
For details of how to use {% data variables.copilot.copilot_chat_dotcom %}, see:

content/copilot/responsible-use/chat-in-your-ide.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ When you use the `@github` chat participant, {% data variables.copilot.copilot_c
3939

4040
{% data reusables.rai.copilot.copilot-chat-ide-leveraging-web-search %}
4141

42+
{% data reusables.rai.copilot.byok-transparency-note %}
43+
4244
{% data reusables.rai.copilot.copilot-chat-ide-use-cases %}
4345

4446
### Answering coding questions
@@ -81,6 +83,8 @@ When you use the `@github` chat participant, {% data variables.copilot.copilot_c
8183

8284
{% data reusables.rai.copilot.copilot-chat-ide-leveraging-web-search %}
8385

86+
{% data reusables.rai.copilot.byok-transparency-note %}
87+
8488
{% data reusables.rai.copilot.copilot-chat-ide-use-cases %}
8589

8690
### Answering coding questions
@@ -115,6 +119,8 @@ This can be a useful tool for programmers, as it can provide guidance and suppor
115119

116120
{% data reusables.rai.copilot.copilot-chat-ide-output-formatting %}
117121

122+
{% data reusables.rai.copilot.byok-transparency-note %}
123+
118124
{% data reusables.rai.copilot.copilot-chat-ide-use-cases %}
119125

120126
### Answering coding questions
@@ -149,6 +155,8 @@ This can be a useful tool for programmers, as it can provide guidance and suppor
149155

150156
{% data reusables.rai.copilot.copilot-chat-ide-output-formatting %}
151157

158+
{% data reusables.rai.copilot.byok-transparency-note %}
159+
152160
## Use cases for {% data variables.copilot.copilot_chat %}
153161

154162
{% data variables.copilot.copilot_chat %} can provide coding assistance in a variety of scenarios.

data/features/copilot-byok.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# BYOK for Copilot (not Copilot Models) #18486
2+
3+
versions:
4+
fpt: '*'
5+
ghec: '*'

0 commit comments

Comments
 (0)