メモ
GitHub Copilot に自身の API キーを持ち込んで利用できる機能は、パブリック プレビュー にあり、変更されることがあります。
GitHub Copilot に独自の API キーを持ち込み、コパイロットチャット、 Copilot CLI (コパイロット CLI)、および VS Code を通じて、チームが優先する大規模言語モデル (LLM) プロバイダーを利用できるようにします。
次のプロバイダーの API キーがサポートされています。
- Anthropic
- AWS Bedrock
- Google AI Studio
- Microsoft Foundry
- OpenAI
- OpenAI 互換プロバイダー
- xAI
微調整されたモデルもサポートされていますが、機能と結果の品質は、微調整の設定によって異なる場合があります。 運用環境で使用する前に、モデルをテストし、その出力を慎重に確認する必要があります。
Why bring your own API keys?
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:
- ガバナンスとコンプライアンス: organization のポリシーと規制要件に準拠した LLM プロバイダーを選びます。
- コスト管理: 既存の支払方法、契約、クレジット、交渉された料金に合わせて、使用量の超過を回避します。
- 可視性と制御: チームがアクセスできるモデルを管理し、プロバイダーの既存のダッシュボードと課金を通じて使用状況を監視できます。
- 柔軟性: organization で既に使っているカスタム モデルまたは特殊なモデルをサポートします。
Adding your key to an enterprise account
重要
We highly recommend adhering to the principle of least privilege by assigning only the minimum necessary scopes to your API keys.
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 コパイロットチャット、 Copilot CLI (コパイロット CLI)、および VS Code. Your models will appear at the bottom of the model picker, under the enterprise name.
-
企業ページに移動してください。 たとえば、GitHub.com の [Enterprise] ページから。
-
ページの上部にある AI コントロールをクリックします。
-
In the sidebar, click Copilot.
-
Click Configure allowed models.
-
[ カスタム モデル ] タブをクリックします。
-
API キーの一覧の上にある [ API キーの追加] をクリックします。
-
[プロバイダー] で、使用する LLM プロバイダーを選択します。
-
[名前] に、このキーの名前を入力します。 これはモデル選択ツールに表示されます。
-
[API キー] で、キーを入力するか貼り付けます。
-
使用しているプロバイダーに応じて、モデルを選択または追加します。
-
OpenAI、Anthropic、または xAI を使用している場合は、API キー テキスト フィールドの をクリックして、キーに関連付けられているモデルをフェッチします。 次に、[使用可能なモデル] で、使用するモデルを選択します。
![[API キーの追加] フォームのスクリーンショット。 [新しいモデルのフェッチ] ボタンがオレンジ色のアウトラインで強調表示されています。](/assets/cb-71871/images/help/copilot/byok-add.png)
-
Microsoft Foundry を使用している場合は、[展開 URL] の下のフィールドに展開 URL を入力します。 次に、[使用可能なモデル] の下のフィールドにモデル ID を入力し、 をクリックして追加します。
モデルのデプロイ URL が異なる場合、同じ API キーに追加することはできません。 デプロイ URL ごとに個別の API キーを作成します。
![[API キーの追加] フォームのスクリーンショット。 モデル テキスト フィールドと [モデルの追加] ボタンがオレンジ色のアウトラインで強調表示されています。](/assets/cb-97361/images/help/copilot/byok-add-foundry.png)
-
-
使用できるようにするモデルを選択または追加したら、[ 保存] をクリックします。
Managing availability of custom models in your organizations
You can choose whether the models you have added are available to organizations in your enterprise account.
- 企業ページに移動してください。 たとえば、GitHub.com の [Enterprise] ページから。
- ページの上部にある AI コントロールをクリックします。
- In the sidebar, click Copilot.
- Click Configure allowed models.
- Click the Custom models tab.
- Above the list of API keys, click the Added models tab.
- 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.
- In the modal that opens, click the Access tab.
メモ
The model must be set to 'Enabled' before the "Access" tab will be available.
- Choose how the model should be made available to organizations:
- To make the model available to all organizations in your enterprise account, select Allow for all organizations.
- To only make the model available for specific organizations, select Choose per organization, and check or uncheck the organizations listed below.
- Click Save.
Further reading
- Enabling custom models for GitHub Copilot in your organization in our documentation for organizations.
- GitHub Copilot Chat について
- GitHub Copilot ポリシーでサポートされるサーフェス