Senpi (OmO Native)
在 Senpi / OmO 裡接入 aicentos —— 設定目錄與 openai-compatible provider 的位置
最後更新於:
Senpi 是 pi-mono 的 fork,npm 套件名 @code-yeongyu/senpi,可執行檔叫 senpi。它同時是 oh-my-openagent(簡稱 OmO)的執行環境,所以「OmO Native」指的是跑在 senpi harness 上的那一套。
準備工作
curl -fsSL https://get.omo.dev/install.sh | bash
omo也可以用 bun 安裝:
bun add -g omo-ai專案自述 experimental,官方原話是不要押在生產流水線上。
需要填寫的設定
設定目錄是 ~/.omo/agent/,可用 OMO_CODING_AGENT_DIR 覆寫;舊的 SENPI_* 變數仍然相容。
| 檔案 | 作用 |
|---|---|
models.json | provider 定義(端點、協議、模型列表) |
auth.json | 金鑰 |
settings.json | 預設模型等偏好 |
senpi 本體另有一套:~/.senpi/agent/settings.json,以及專案層級 .senpi/settings.json。
| 欄位 | 值 |
|---|---|
| provider 協議 | @ai-sdk/openai-compatible |
| Base URL | https://aicentos.com/v1 |
| API Key | 控制台建立的 Key |
| 模型 | 控制台「模型廣場」中的模型名 |
設定步驟
在 ~/.omo/agent/models.json 裡加一個 provider,協議選 OpenAI 相容那一類(文件給的對應是 npm: @ai-sdk/openai-compatible):
{
"providers": {
"aicentos": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://aicentos.com/v1",
"apiKey": "sk-你的-API-Key"
},
"models": {
"你的模型名": {}
}
}
}
}金鑰也可以單獨放 auth.json,不寫進 models.json。然後把預設模型寫進 settings.json。
測試
啟動 omo 或 senpi,在模型選擇器裡確認出現 aicentos 下的模型,發一句話確認能返回。
注意事項
- 兩個設定目錄別混:OmO 側在
~/.omo/agent/,senpi 側在~/.senpi/agent/,改錯地方不生效。 - 專案層級
.senpi/settings.json會覆寫全域設定,排查問題時先看專案目錄。 - 官方文件只給了遷移對應,沒有給完整的字面設定片段,上面的結構按 Pi 系約定整理,欄位名請以
omo.dev/docs目前版本核對。 - experimental 專案,升級後設定結構可能變。