🔧 改進:免費通道對齊官方 2.x 客戶端
- 匿名免費通道優先走
/inference(v2 lane),失敗才回退/zen(v1 lane)。 - v2 lane 的 Anthropic 請求補上
?beta=true與anthropic-version: 2023-06-01,並移除未使用的 fine-grained streaming beta。 - 子會話的
x-opencode-session-id保留 child id;x-opencode-session/ affinity 使用 canonical parent id,並補上x-opencode-parent-session-id。 global與 git commit 形狀的 project id 直接透傳,不再額外 hash。- v2 gate 現在能辨識並校正
patch工具的官方 schema;shell 描述維持官方 Linux/bash 版本。
🐛 修正
- 修正
patch工具的patchTextdescription,與 OpenCode 2.0.32 完全一致,避免免費通道 403。 - 修正子會話 id 被 affinity 覆蓋的問題;外來 parent session id 現在按 server key 隔離。
?beta=true只套用在 v2 Anthropic lane,v1/zen維持 1.x 形狀。- 移除重複的
anthropic-version,合併重複的 project id renderer,還原opencode_tools.json的格式噪音。 - 更新 lane 順序相關註解與三份 README。
⚠️ 升級注意
- 免費模型現在優先走
/inference,該通道失敗才回退/zen;首次請求可能多一次上游嘗試。 - v2 的 session/project header 形狀有調整,上游 prompt cache 可能重建一次。
What's Changed
- feat(upstream): mimic the genuine free-tier client on the v2 lane by @byi4 in #130
- fix: align the v2 free-tier shape with OpenCode 2.0.32 by @jasonxu114514 in f0f064f
Full Changelog: v1.4.2...v1.4.3