fix: optimize Codex relay - #2826
Conversation
WalkthroughThe Codex adaptor is updated to ensure proper request formatting by defaulting empty instructions to an empty string and standardizing HTTP headers. Content-Type is explicitly set to application/json, and Accept header is conditionally set based on streaming mode. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
1就不必了吧,codex的可以改,可以清理一下我来merge |
|
你的修改可能会导致已经安装的用户出现迁移失败,无法启动的问题 |
3dc1db9 to
05ed9d4
Compare
已清理关于1的修改,现在仅保留对codex渠道的修复,麻烦查看下 |
fix: optimize Codex relay
1. 修复订阅计划表的数据库兼容性 (SQLite/PostgreSQL)
decimal(10,6)标签,并在 model/main.go 的 SQLite 迁移脚本中同步改用REAL类型。2. 优化 Codex 渠道的中继逻辑
instructions字段增加默认值(空字符串),防止部分通过通用 OpenAI 协议调用的请求因缺少该字段而报错。Content-Type: application/json并优化Accept头,避免非 Codex 客户端因未携带正确参数而被 Codex 后端拒绝。是否有破坏性更新:否
Summary by CodeRabbit