教程 · 精选
OpenRouter 教程:用 Responses API 构建可在 Linux 沙箱验证 bug 的 AI 代码审查脚本
导读
OpenRouter 发布教程,介绍一个 233 行、仅用标准库的 review.py,通过 Responses API 组合 Files API、Shell 沙箱工具和 Apply Patch 工具,把变更文件上传到托管 Linux 沙箱,让模型实际运行检查确认 bug 并返回 V4A 补丁。
推荐理由
教程给出在沙箱中运行代码验证 bug 的完整脚本与四模型实测数据,读者可照搬接入 pre-push 钩子或 GitHub Actions。