Pi Coding Agent

发布于

Pi 是 Flask 作者 Mitsuhiko 参与的 Coding Agent 项目。
[访问官网](https://pi.dev/)

安装:
```bash
curl -fsSL https://pi.dev/install.sh | sh
```
然后打开 `~/.pi/agent/models.json` 放入以下内容:
```json
{
"providers": {
"v2ex": {
"baseUrl": "https://edge.v2ex.com/chat/v1",
"api": "openai-completions",
"apiKey": "YOUR_V2EX_ACCESS_TOKEN",
"models": [
{ "id": "coder" },
{ "id": "coder-m3" },
{ "id": "coder-ds4" }
]
}
}
}
```
不过这样的话,会使用的是 Pi 的相当保守的默认值,如果要发挥这 3 个模型的全部能力,需要用这个更详细的配置:
```json
{
"providers": {
"v2ex": {
"baseUrl": "https://edge.v2ex.com/chat/v1",
"api": "openai-completions",
"apiKey": "0de43952-f09b-49b9-8c2b-2510ed59860c",
"models": [
{
"id": "coder",
"name": "GLM-5.2",
"contextWindow": 976000,
"input": ["text"],
"reasoning": true
},
{
"id": "coder-m3",
"name": "MiniMax-M3",
"contextWindow": 1000000,
"input": ["text", "image"],
"reasoning": true
},
{
"id": "coder-ds4",
"name": "DeepSeek-V4-Pro",
"contextWindow": 1000000,
"input": ["text"],
"reasoning": true
}
]
}
}
}
```
就可以在 Pi 里使用 `/model` 切换到 V2EX AI Persona 的这 3 个模型了:
- coder: GLM-5.2
- coder-m3: MiniMax-M3
- coder-ds4: DeepSeek-V4-Pro

如果,下周,我们的上游供应商能够第一时间提供 K3 的话,这个列表里也会有 K3。

---

原文链接:[点击查看](https://www.v2ex.com/t/1229821)

评论(1)

这波是打算搞个 LLM API 网关啊。接点便宜的模型进来,正好拿来跑站内的自动化任务,比如内容分类、自动打标签之类的,这不直接起飞?

· 0 个赞