Source: https://ailoot.ai/docs/zh-hant-tw/integrations/vscode-copilot-byok/
Canonical: https://ailoot.ai/docs/zh-hant-tw/integrations/vscode-copilot-byok/
Language: zh-hant-tw

[編輯器與IDE](https://ailoot.ai/docs/zh-hant-tw/integrations/#editors) 

# VS Code + Copilot Chat

[Markdown](https://ailoot.ai/docs/zh-hant-tw/integrations/vscode-copilot-byok/index.md)

編輯器擴充套件 · OpenAI Chat、OpenAI Responses、Anthropic Messages

| 格式 | 設定位置 |
| --- | --- |
| OpenAI Chat, OpenAI Responses, Anthropic Messages | 在聊天中選擇模型 → Manage Language Models (齒輪圖示) → Add Models → Custom Endpoint → VS Code 會開啟 chatLanguageModels.json。舊的 github.copilot.chat.customOAIModels 設定已過時。 |

## [](https://ailoot.ai/docs/zh-hant-tw/integrations/vscode-copilot-byok/#setup)設定

複製設定，並將`sk-...`替換為您的 Ailoot 控制台金鑰。若應用程式支援，最好將金鑰存放在環境變數`AILOOT_API_KEY`中。

執行前，請使用 Ailoot 金鑰呼叫 GET /v1/models。選擇支援方法包含 POST /v1/chat/completions, POST /v1/responses, POST /v1/messages 的確切模型 ID，並填入設定。使用代理程式時，也請確認工具支援及客戶端版本所需的功能。

```json
[
  {
    "name": "Ailoot",
    "vendor": "customendpoint",
    "apiKey": "${input:ailootApiKey}",
    "apiType": "chat-completions",
    "models": [
      {
        "id": "gpt-6.1-sol",
        "name": "GPT-6.1 Sol (Ailoot)",
        "url": "https://api.ailoot.ai/v1/chat/completions",
        "toolCalling": true,
        "vision": false,
        "maxInputTokens": 200000,
        "maxOutputTokens": 32000
      }
    ]
  },
  {
    "name": "Ailoot Claude",
    "vendor": "customendpoint",
    "apiKey": "${input:ailootApiKey}",
    "apiType": "messages",
    "models": [
      {
        "id": "claude-sonnet-5-5",
        "name": "Claude Sonnet 5.5 (Ailoot)",
        "url": "https://api.ailoot.ai/v1/messages",
        "toolCalling": true,
        "vision": false,
        "maxInputTokens": 200000,
        "maxOutputTokens": 32000
      }
    ]
  }
]
```

模型範例：`gpt-6.1-sol`。若要使用其他模型，請從此處選取：[目錄](https://ailoot.ai/models/zh-hant-tw/) —請確認模型支援所需格式。

## [](https://ailoot.ai/docs/zh-hant-tw/integrations/vscode-copilot-byok/#notes)重要須知

url 是完整的端點路徑。apiType 的值包括 chat-completions、responses (url .../v1/responses)、messages (url .../v1/messages)。BYOK 不需要 Copilot 方案或 GitHub 登入，但僅適用於聊天／代理，行內建議仍使用 Copilot。組織管理員 (Business/Enterprise) 可停用 BYOK 政策。上方 token 上限只是範例，請使用目錄中的值。這些範例設定 vision = false，因 2026-09-30 的目錄快照僅為 GPT/OpenAI Chat與Claude/Anthropic Messages 列出文字。若您的 VS Code 版本提供 vision，只有目前目錄中的特定模型資訊卡明確列出所選 API 格式支援 image 輸入時，才能啟用；用戶端中有此欄位，不代表所選模型支援影像。

## [](https://ailoot.ai/docs/zh-hant-tw/integrations/vscode-copilot-byok/#check)驗證

- OpenAI 格式的位址為`https://api.ailoot.ai/v1` (若應用程式要求完整位址，則使用完整路徑)。
- Anthropic 格式的位址為`https://api.ailoot.ai`搭配完整端點路徑，包含：`/v1`。
- 提出一個簡短問題。若收到錯誤，請查看代碼與Request ID，並對照此頁面：[錯誤與限制](https://ailoot.ai/docs/zh-hant-tw/errors/)。
- 剛完成設定就遇到 404，幾乎總是位址不正確，可能多加或漏加了`/v1`。
- 402 表示餘額不足以涵蓋保留金額。代理需要保留的金額比聊天更多：[原因](https://ailoot.ai/docs/zh-hant-tw/billing/reserve/)。

應用程式說明文件：[https://code.visualstudio.com/docs/agent-customization/language-models](https://code.visualstudio.com/docs/agent-customization/language-models)

還有疑問嗎？請提供 Request ID與問題描述，我們會協助釐清。[聯絡支援](mailto:support@ailoot.ai)

## Ailoot · 公司及其專案組合





Ailoot以累積的營運經驗、廣大的客戶群、穩定的服務及持續的KPI管理為基礎。





公司及其專案組合：數百萬客戶，每月銷售額達數十億。





Ailoot將這些營運經驗用於API存取，讓客戶的產品、代理、應用程式及自動化流程使用AI功能。
