攝影或3C

GitHub Copilot Bring Your Own Key (BYOK):使用 Poe API Key ; https://poe.com/api/keys ; chatLanguageModels.json

 

1. 先確認 Poe API Key 和模型可用

需要一把在 Poe API 頁面產生的 Poe API Key,
以及 Poe API 支援的模型 ID。
先執行 poe_list_models.py,
確認模型清單中有:
qwen3.8-max-0902
kimi-k3.1-pro

"""列出 Poe 上能用 API 文字對話的模型(poe_api_教學.md 第 3 節)。

POE_API_KEY 必須存在於目前 Python 程序的環境中。
公司網路使用下方 PROXY_URL;執行前若 Proxy 要求 NTLM,先用 Git 附的 curl 暖身。
"""
# 公司網路 Proxy;若使用可直接連 Poe 的網路,改為 None。
PROXY_URL = "http://10.6.123.456:6666"

import os
import httpx
import openai

http_client = httpx.Client(proxy=PROXY_URL, timeout=120, trust_env=False)
client = openai.OpenAI(
    api_key=os.environ["POE_API_KEY"],
    base_url="https://api.poe.com/v1",
    http_client=http_client,
)
try:
    models = client.models.list().data
finally:
    client.close()

# 輸出有文字的就能用 /v1/chat/completions;不要看 supported_endpoints(大多是空白,空白的也能用)
chat = sorted(m.id for m in models if "text" in m.architecture["output_modalities"])
print(f"全部 {len(models)} 個,能文字對話 {len(chat)} 個")
for model_id in chat:
    print(model_id)

2. 在 VS Code 新增 Custom Endpoint

  1. 按 Ctrl + Shift + P,執行 Chat: Manage Language Models。
  2. 在 Language Models 檢視右上角按 Add Models,選 Custom Endpoint。
    不要選 OpenAI:Poe 雖然相容 OpenAI API,但不是 OpenAI 的服務端點。
  3. 若出現標題為 Poe: API Key 的輸入框,貼上 Poe API Key 並按 Enter。
    若新增流程沒有出現輸入框,
    等群組建立後,滑到 Poe 群組標題列,
    按齒輪並選 Update API Key。
  4. 若接著出現 Poe: API Type 選單,
    選 Chat Completions(畫面可能顯示 Chat Completions API)。
    不要選 Responses API 或 Messages API:
    本指南使用的 Poe URL 是 /v1/chat/completions,
    與 Chat Completions 格式相符。
  5. API Key 輸入框會把金鑰存入 VS Code 的 SecretStorage。
    不要把明碼金鑰貼進 chatLanguageModels.json;
    成功後檔案會由 VS Code 自動加入類似
    ${input:chat.lm.secret.<generated-id>} 的參照。

如果 Poe 群組已建立,但新增精靈已關閉

如果 Language Models 檢視已經看得到 poe 群組,
不要再按右上角 Add Models 建第二個群組。
從現有群組接著完成:

  1. 在 poe 群組標題列按齒輪 → Update API Key。
    輸入 Poe API Key、按 Enter。
    即使之前已輸入過但不確定是否完成,也可在這裡重新設定。
  2. 再按同一個齒輪 → Open in Language Models (JSON)。
  3. 找到 "name": "poe" 的 group。
    保留 VS Code 自動產生的 apiKey 參照;
    group 的 "apiType" 可以不寫。
  4. 在該 group 的 "models" 陣列中,編輯現有模型列
    (不要另外新增重複模型。將該模型物件改成:
    {"id":"qwen3.8-max-0902","name":"Poe qwen3.8-max-0902","url":"https://api.poe.com/v1/chat/completions","toolCalling":false,"vision":true,"maxInputTokens":128000,"maxOutputTokens":65536,"modelOptions":{"temperature":null,"top_p":null}}

    這個 model 物件要放在 "models": [ ... ] 裡。保留 group 中由 VS Code 產生的 "apiKey": "${input:chat.lm.secret....}",不要刪除、改寫成明碼或照抄省略號。
  5. 存檔。回到 Language Models 檢視,確認 Poe 群組下的模型名稱變成 Poe qwen3.8-max-0902。模型列上的數字是 maxInputTokens+maxOutputTokens(改完會從 144K 變大),Tools、Vision 標記照 toolCalling、vision 顯示(toolCalling 改成 false 後應該不再顯示 Tools)。這些只是 VS Code 顯示的設定宣告,不代表 Poe API 已經成功連線;圖片輸入仍需另外端到端測試。
  6. 這個續做方式不要求重新走 Add Models → Custom Endpoint → API Type 精靈。若 group 或 model 物件的欄位不確定,先不要刪除整個群組;保留現有 apiKey 參照,依第 3 節範例調整 Poe group/model 欄位。
{
  "id": "qwen3.8-max-0902",
  "name": "Poe qwen3.8-max-0902",
  "url": "https://api.poe.com/v1/chat/completions",
  "toolCalling": false,
  "vision": true,
  "maxInputTokens": 128000,
  "maxOutputTokens": 65536,
  "modelOptions": {
    "temperature": null,
    "top_p": null
  }
}

3. 加入 Poe 模型設定

在 Poe 群組標題列的齒輪選 
Open in Language Models (JSON)。

把以下物件加入最外層陣列 [ ... ];
若檔案已經有其他群組,請保留它們,
不要用此範例覆蓋整個檔案。

{
  "name": "Poe",
  "vendor": "customendpoint",
  "apiType": "chat-completions",
  "models": [
    {
      "id": "qwen3.8-max-0902",
      "name": "Poe qwen3.8-max-0902",
      "url": "https://api.poe.com/v1/chat/completions",
      "toolCalling": false,
      "vision": true,
      "maxInputTokens": 128000,
      "maxOutputTokens": 65536,
      "modelOptions": {
        "temperature": null,
        "top_p": null
      }
    },
    {
      "id": "kimi-k3.1-pro",
      "name": "Poe kimi-k3.1-pro",
      "url": "https://api.poe.com/v1/chat/completions",
      "toolCalling": false,
      "vision": true,
      "maxInputTokens": 128000,
      "maxOutputTokens": 65536,
      "modelOptions": {
        "temperature": null,
        "top_p": null
      }
    }
  ]
}
  • vendor 一定是 customendpoint,不要改成 poe:vendor 是 Copilot 用哪一種連線方式的固定值(這台電腦的檔案裡有 copilot、customendpoint、agent-host-copilotcli),改成它不認得的值,這一組模型會從清單消失。顯示成「poe」的是 group 的 name。
  • url 必須是完整的 /v1/chat/completions 路徑。
  • group 的 apiType 可以不寫:2026-11-10 這台電腦 poe 那一組沒寫,兩個模型實測可用。原因是 URL 已經寫到 /chat/completions——Copilot Chat 0.73.0 的 Custom Endpoint(dist/extension.js 的 createOpenAIEndPoint)是這樣決定的:① apiType 取 model 物件的、沒有就取 group 的;② URL 裡已經有 /chat/completions、/responses 或 /messages 就照原樣用,沒有才照 apiType 補(預設補 /chat/completions;結尾是 /v1 這種直接接,否則先補 /v1);③ 兩處都沒寫 apiType 時,照最後的 URL 判斷(有 /messages→messages、有 /responses→responses、其他→chat-completions)。所以 AI Factory 那一組的 URL 只寫到 /v1,靠 apiType 補路徑;apiType 和 URL 寫的路徑不一致時,URL 照原樣、送的格式卻照 apiType,會出錯。同一個檔裡 AI Factory、AOAI 那兩組有 "apiType": "chat-completions",是新增精靈選 Chat Completions 時 VS Code 寫的;要寫就用這個值(不要寫 responses、messages)。model 物件裡也可以各自寫 apiType 覆寫 group 的(例:Azure 的 Terra 那一筆寫 responses)。
  • id 必須是 Poe API 的 model ID;此例使用清單中的 qwen3.8-max-0902(Alibaba)與 kimi-k3.1-pro(Moonshot AI)。加別的 Poe 模型時,複製一個 model 物件、改 id 與 name 就好(同一個 URL、同一把金鑰)。
  • maxInputTokens、maxOutputTokens 是 Copilot 端宣告的 input/output 上限,不是 Poe 回報的最大值。VS Code 新增模型時預填 128000/16000,但 16000 太小:這兩個模型的推理一直開著,推理 token 算在輸出裡。2026-11-09~10 實際審計畫時,Qwen 3.8 Max 每輪輸出 20,140~28,024 token(推理 17,020~22,725),Kimi K3.1 Pro 13,079~20,961(推理 10,200~16,293)——16000 會在推理途中截斷、答案寫不出來。範例改成 65536(11/09 用 max_tokens: 64000 呼叫 Poe 沒被拒;更大的值沒有試過)。輸入與輸出合計要在模型的 context 之內(Qwen 991K、Kimi 約 1M)。
  • Poe 的 2026-11-09 /v1/models 快照列出 Qwen 的 context_length=991000、max_output_tokens=null、輸入型態含 text/image,並列有 tools 功能。這些是 Poe 回傳的 metadata 宣告,不是本指南已實測的 Copilot BYOK 效能或上限。maxInputTokens 先保留 128000、不要自行改成 991K:Copilot Chat 會把系統提示、對話紀錄與附加內容塞到這個上限,越大每次送出的 token 越多、回應越慢。
  • toolCalling: false:Poe metadata 雖列出 tools,但打開後 Copilot 的 agent 模式會讀工作區檔案送給 Poe(見開頭的資料提醒)。vision: true 沿用 UI 預填值;Poe + Copilot BYOK 的圖片輸入尚未端到端驗證,貼截圖前先確認畫面裡沒有公司資料。
  • modelOptions 的兩個 null:Copilot 對每一個 BYOK 請求都會強制加上 temperature: 0.1、top_p: 1,寫成 null 才不送、改用 Poe 的預設值(推理模型常不接受 0.1;接受的也會變得很死板)。modelOptions 要放在 model 物件裡,不是 group。
  • 推理強度沒有設定:Kimi K3.1 Pro 用 Poe 的預設 high(2026-11-09~10 的審查都是這樣跑的)。要在 Copilot 介面切換強度,得另加 supportsReasoningEffort;Copilot 送出的格式 Poe 收不收沒有驗證過,所以範例不加。
  • streaming 不要寫:不寫時 Copilot 預設串流。這兩個模型審一份計畫要 1~12 分鐘,寫成 false 時這段時間連線上完全沒有資料,容易被中途切斷(11/10 Copilot 的 LM Bridge 與 Copilot CLI 都在約 10 分鐘斷線)。
  • apiKey 不放在這個範例裡;用第 2 節的 Update API Key 寫入 SecretStorage。完成後 VS Code 會自行加入金鑰參照。

存檔後通常不需要重載 VS Code(模型清單沒更新時再 Reload Window)。若 Poe 群組已存在,只需把 models 項目合併進該群組,不要重複建立同名群組。

4. Utility Model(不用設定)

Utility Model 是什麼: 你在 Copilot Chat 選的模型(Poe Qwen、Kimi)負責回答;回答以外的雜事,Copilot 交給另一個「Utility Model」做。 在這台電腦的 Copilot Chat 0.73.0 原始碼(dist/extension.js)裡,交給它的有:產生對話標題、對話太長時摘要壓縮、判斷你這句話要做什麼(intent、prompt 分類)、 產生搜尋關鍵字、產生 git commit 訊息等。這些雜事都會用到對話內容。

選 BYOK 模型當主模型時,雜事交給誰——由設定 chat.byokUtilityModelDefault 決定,只有三個值:

結論:不用設定,維持預設 copilot。
 2026-11-10 這台電腦的 settings.json 沒有這個設定,用的就是 copilot。
不要改成 mainAgent。
只有看到 No utility model is configured 時才回來檢查:
多半是這個設定被改成 none,改回 copilot 即可。
要指定某一個模型做雜事,
另有 chat.utilityModel、chat.utilitySmallModel 兩個設定;
要設的話用公司的模型(例:AI Factory 的 glm),不要設成 Poe。

推薦hahow線上學習python: https://igrape.net/30afN

快速編輯 chatLanguageModels.json
(BYOK 設定檔,在使用者設定檔資料夾)

C:\Users\SavingKing\AppData\Roaming\Code\User\chatLanguageModels.json

2. 終端機直接開(最快)

PowerShell:

code $env:APPDATA\Code\User\chatLanguageModels.json

Git Bash:

code "$APPDATA/Code/User/chatLanguageModels.json"

Win + R:

%APPDATA%\Code\User\chatLanguageModels.json

會以 .json 的預設程式開啟
chatLanguageModels.json;
通常就是 VS Code, Cursor。

整個設定只有金鑰一定要用 UI 寫;
其他全部直接改 chatLanguageModels.json,
不用走新增精靈。

 {
  "name": "poe",
  "vendor": "customendpoint",
  "apiKey": "${input:chat.lm.secret.63f9df7a}",
  "models": [
   {
    "id": "qwen3.8-max-0902",
    "name": "Poe qwen3.8-max-0902",
    "url": "https://api.poe.com/v1/chat/completions",
    "toolCalling": false,
    "vision": true,
    "maxInputTokens": 128000,
    "maxOutputTokens": 65536,
    "modelOptions": {
     "temperature": null,
     "top_p": null
    }
   },
   {
    "id": "kimi-k3.1-pro",
    "name": "Poe kimi-k3.1-pro",
    "url": "https://api.poe.com/v1/chat/completions",
    "toolCalling": false,
    "vision": true,
    "maxInputTokens": 128000,
    "maxOutputTokens": 65536,
    "modelOptions": {
     "temperature": null,
     "top_p": null
    }
   }
  ]
 },
 {
  "name": "OpenAI",
  "vendor": "openai",
  "apiKey": "${input:chat.lm.secret.-59053348}",
  "zeroDataRetentionEnabled": false
 }

之後要改模型的欄位、加別的 Poe 模型,都只改 JSON;
apiKey 那一行不動,金鑰就不用重填。

推薦hahow線上學習python: https://igrape.net/30afN

poe models:

全部 301 個,能文字對話 202 個
aplomb-1
assistant
canvas-creator
cartesia-ink-whisper
claude-code
claude-haiku-4.5
claude-haiku-5.5
claude-opus-4.5
claude-opus-4.6
claude-opus-4.7
claude-opus-4.8
claude-sonnet-4.5
claude-sonnet-4.6
claude-sonnet-5.5
code-editor
code-saver
deep-ai-search
deepgram-nova-3
deepreasoning
deepseek-r1-di
deepseek-r1-turbo-di
deepseek-v3-di
deepseek-v3-turbo-di
deepseek-v3.1
deepseek-v3.2
deepseek-v4-flash
deepseek-v4-pro
deepseek-v4-pro-0813
deepseek-v4-pro-0813-el
deepseek-v4-pro-e
deepseek-v4-pro-t
deepseek-v4.1-flash-1017
ds-v4-flash-0731-el
ds-v4.1-flash-1017
elevenlabs-music
elevenlabs-v3
exa-answer
exa-search
flux-dev-finetuner
flux-fill
fugu-ultra-v1.0-el
fugu-ultra-v1.1-el
gemini-2.5-flash-tts
gemini-2.5-pro-tts
gemini-3-flash
gemini-3.1-flash-lite
gemini-3.1-pro
gemini-3.5-flash
gemini-3.5-flash-lite
gemini-3.7-flash
gemini-3.8-flash
gemini-4-hydrogen
gemma-3-27b
gemma-4-26b-a4b
gemma-4-26b-a4b-el
gemma-4-31b
gemma-4-31b-vercel
glm-4.6
glm-4.7-flash
glm-5.2
glm-5.3
glm-5.3-el
glm-5.3-fast
glm-5.3-flash
glm-5.3-flash-el
gpt-4.1
gpt-4.1-mini
gpt-4o
gpt-4o-aug
gpt-4o-mini
gpt-5
gpt-5-mini
gpt-5-nano
gpt-5-pro
gpt-5.1
gpt-5.2
gpt-5.2-pro
gpt-5.3-codex
gpt-5.4
gpt-5.4-mini
gpt-5.4-nano
gpt-5.4-pro
gpt-oss-120b
gpt-oss-120b-cs
gpt-oss-120b-t
gpt-oss-20b
gpt-oss-20b-t
gpt-researcher
gptzero
grok-4.20-multi-agent
grok-4.3
grok-4.5
grok-4.6
grok-4.7
grok-imagine-image-2
grok-imgn-video-1.5
happyhorse-1.0-el
happyhorse-1.1
inkling
interpreter
kimi-k2.6
kimi-k3
kimi-k3-el
kimi-k3.1-pro
kling-1.5-pro
kling-2.5-turbo-std
kling-3.0-turbo
kling-avatar-pro
linkup-deep-search
linkup-standard
liveportrait
llama-3.1-8b-di
llama-3.1-8b-fp16
llama-3.3-70b
llama-3.3-70b-t
llama-4-maverick
manus
markitdown
mercury-3-vercel
mimo-v2.6-flash
mimo-v2.6-flash-el
mimo-v2.6-pro-el
mimo-v2.6-pro-ultraspeed-el
minimax-h3-el
minimax-m2.1
minimax-m2.5
minimax-m3
minimax-m3-t
minimax-m3.1-flash-e
mistral-7b-v0.3-di
mistral-large-4
mistral-small-3.1
mistral-small-4
mochi-preview
muse-ember
muse-glimmer-30b-el
muse-spark-1-1
muse-spark-open
muse-wonder-1.0
nano-banana-2.1
nova-lite-1.0
nova-lite-2
nova-micro-1.0
nova-pro-1.0
o3
o3-pro
pearl-gemma-4-31b
perplexity-adv-deep-research
perplexity-deep-research
perplexity-pro-search
perplexity-search
perplexity-sonar
perplexity-sonar-pro
perplexity-sonar-rsn-pro
phi-4-di
pika-v1.5-effects
pixverse-v6-max
python
qwen-audio-3.0-tts
qwen-image-2
qwen-image-2-pro
qwen-image-3.0-el
qwen3-235b-a22b-di
qwen3-coder-next
qwen3.5-4b-el
qwen3.5-9b-el
qwen3.5-flash-el
qwen3.5-omni-flash
qwen3.5-omni-plus
qwen3.5-plus-el
qwen3.6-plus-t
qwen3.7-flash-el
qwen3.7-max-el
qwen3.7-max-t
qwen3.8-2.4t-a95b
qwen3.8-27b-el
qwen3.8-flash
qwen3.8-flash-el
qwen3.8-max-0902
qwen3.8-max-0902-el
qwen3.8-max-el
qwen4-max
qwen4-max-el
reka-core
reka-flash
restyler
script-bot-creator
seed-2.0-code
seed-2.0-lite
seed-2.0-mini
seed-2.0-pro
seed-2.1-turbo
seedance-2.0-mini
seedance-2.5-el
seedance-2.5-flash
seedream-4.5
seedream-5.0-flash
seedream-5.0-lite-el
seedream-5.0-pro
seedream-5.5-el
step-3.7-flash-el
step-5-preview-el

推薦hahow線上學習python: https://igrape.net/30afN

儲蓄保險王

儲蓄險是板主最喜愛的儲蓄工具,最喜愛的投資理財工具則是ETF,最喜愛的省錢工具則是信用卡