fix: prompt_cache_key openai chat -> openai responses - #6861
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughThe request conversion now preserves non-empty ChangesPrompt cache key conversion
Estimated code review effort: 2 (Simple) | ~5 minutes Suggested reviewers: Poem
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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 |
Sync fork with upstream Calcium-Ion/new-api (6 commits): - test(web): standardize frontend tests on Vitest (QuantumNous#6569) - fix(oauth): align custom binding response fields in frontend (QuantumNous#6818) - fix(relay): stop injecting empty tools into Claude requests - feat: add field passthrough controls for gateway channels (QuantumNous#6847) - fix: prompt_cache_key openai chat -> openai responses (QuantumNous#6861) - fix(topup): guard wallet quota during recharge Conflict resolved: web/bun.lock regenerated via 'bun install' to reconcile the Vitest toolchain with fork dependencies.
上游 253a74d(QuantumNous#6654) 与 7d09c69(QuantumNous#6861) 新增的测试用例调用 ResponsesRequestToChatCompletionsRequest / ChatCompletionsRequestToResponsesRequest 时使用的是旧签名,而本地 PR QuantumNous#6655 补丁已为这两个函数引入 convmeta.Meta 首参(reasoning_content 跨转换保留的核心机制)。 合并后函数定义取本地版本、测试取上游版本,导致 relaykit 模块 vet 失败。为 5 处新增用例补上 nil meta。 受影响用例: - to_oai_chat_req_test.go: penalty 转换 2 处 - to_oai_responses_req_test.go: prompt_cache_key 2 处 / penalty 1 处 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014AZbTUCaSkfaTLkrfzKGSP
Important
📝 变更描述 / Description
(简述:做了什么?为什么这样改能生效?请基于你对代码逻辑的理解来写,避免粘贴未经整理的内容)
补充 chat转responses prompt_cache_key
🚀 变更类型 / Type of change
🔗 关联任务 / Related Issue
✅ 提交前检查项 / Checklist
Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。📸 运行证明 / Proof of Work
(请在此粘贴截图、关键日志或测试报告,以证明变更生效)
Summary by CodeRabbit
Bug Fixes
Tests