v1.2.19:Bun → Node.js 迁移 + GPT-5.4 Codex
发布日期:2026-03-06
🎯 一句话总结
核心模块从 Bun API 迁移到 Node.js 标准库,提升兼容性;Codex 模型列表新增 GPT-5.4。
✨ 新功能:Codex 支持 GPT-5.4
这次更新了什么?
OpenAI Codex 允许使用的模型列表新增 gpt-5.4。
Codex 是什么?
Codex 是 OpenAI 的代码生成模型,OpenCode 支持将其作为代码补全和生成后端。
如何使用?
确保配置了 OpenAI Codex,然后选择 gpt-5.4 模型即可。
🔧 重要改进:Bun → Node.js 迁移
这次更新了什么?
OpenCode 核心模块逐步将 Bun 特有 API 替换为 Node.js 标准库,提升跨平台兼容性。
具体变更
| 原 Bun API | 替换为 |
|---|---|
Bun.stderr | Node.js process.stderr |
Bun.color | Node.js 等效实现 |
Bun.connect | net.createConnection |
Bun.hash | xxhash3-xxh64 |
Bun.sleep | Node.js setTimeout |
Bun.write | Filesystem 工具 |
Bun.stdin.text() | Node.js stream consumers |
这有什么用?
- 更好的兼容性:减少对 Bun 特性的依赖
- 更稳定的行为:Node.js 标准库更成熟
- 为未来铺路:可能支持其他运行时
📊 要不要升级?
| 情况 | 建议 |
|---|---|
| 使用 Codex + GPT-5.4 | ✅ 推荐 |
| 遇到过 Bun 兼容性问题 | ✅ 推荐 |
| 用得好好的 | ⚪ 可以等下次 |
⬆️ 升级命令
bash
opencode upgrade📋 技术细节
点击展开原始 Release Notes
Core
- Add GPT-5.4 to Codex allowed models list (@msadiks)
- Replace Bun.stderr and Bun.color with Node.js equivalents
- Replace Bun.connect with net.createConnection for better compatibility
- Use SHA1 for hash instead of unsupported xxHash3-XXH64
- Replace Bun.hash with Hash.fast using xxhash3-xxh64
- Replace Bun.write with Filesystem.write in config files
- Replace Bun.write/file with Filesystem utilities in snapshot
- Replace Bun.sleep with Node.js timers for better compatibility
TUI
- Use node:stream/consumers for stdin reading
- Replace Bun.stdin.text with Node.js stream reading for better compatibility
Desktop
- Fix stale show (@neriousy)
- Remove keyboard shortcut tooltips from new session and new workspace buttons in the sidebar
- Load tab when opening file
Thank you to 3 community contributors

