# GitHub Copilot 設定ガイド

> Copilot CLI または Copilot アプリの BYOK を使い、カスタム OpenAI 互換エンドポイントを LLMoxy に向けます。

ウェブサイト：[https://github.com/features/copilot](https://github.com/features/copilot)

GitHub Copilot の補完は、デフォルトでは GitHub がホストするモデルを使用します。リクエストを LLMoxy に送るには **BYOK**（Bring Your Own Key）を使用します。VS Code のチャットウィンドウについては [VS Code Agents ウィンドウ設定ガイド](https://jp.llmoxy.com/docs/code-tutorials/vscode-agents) を参照してください。

始める前に [LLMoxy トークン](https://jp.llmoxy.com/docs/get-started/get-token) を 1 つ用意してください。**auto** グループの使用をおすすめします。モデルは tool calling とストリーミング出力に対応している必要があります。

## Copilot CLI

```bash
export COPILOT_PROVIDER_TYPE=openai
export COPILOT_PROVIDER_BASE_URL=https://llmoxy.com/v1
export COPILOT_PROVIDER_API_KEY=あなたのLLMoxy API Key
export COPILOT_MODEL=grok-4.7
copilot
```

| 変数 | 値 |
| --- | --- |
| `COPILOT_PROVIDER_BASE_URL` | `https://llmoxy.com/v1` |
| `COPILOT_PROVIDER_API_KEY` | LLMoxy トークン |
| `COPILOT_MODEL` | コンソールに表示される正確な ID |
| `COPILOT_PROVIDER_TYPE` | `openai`（デフォルト） |

Claude シリーズを使う場合は、次のように変更します。

```bash
export COPILOT_PROVIDER_TYPE=anthropic
export COPILOT_PROVIDER_BASE_URL=https://llmoxy.com
export COPILOT_PROVIDER_API_KEY=あなたのLLMoxy API Key
export COPILOT_MODEL=claude-opus-5-5
```

## Copilot アプリ

1. GitHub Copilot アプリを開きます。
2. **Settings → Model Providers → Add provider** を選択します。
3. OpenAI-compatible（または任意の互換 HTTP エンドポイント）を選択します。
4. Base URL に `https://llmoxy.com/v1` を入力し、API Key を貼り付けて保存します。
5. セッションのモデルセレクターで、追加したモデルを選択します。

これは https://jp.llmoxy.com/docs/code-tutorials/github-copilot の markdown 版です。
