v2.6.40
BenedictKing/ccxv2.6.40Mar 18, 2026by github-actions[bot]
AI Summary
Adds support for arbitrary JSON objects in `metadata.user_id` and improves error handling to prevent unnecessary failover.
Key Highlights
- Supports JSON objects for `metadata.user_id`
- Excludes auth errors from failover logic
- Prevents 4xx errors from triggering failover
Full Release Notes
### 🔧 改进 - **metadata.user_id 通用 JSON 对象支持** - 扩展规范化逻辑支持任意 JSON 对象格式,优先处理 Claude Code 标准字段,对非标准格式按字母序拼接,确保更广泛的上游兼容性 ### 🐛 修复 - **修复 invalid_request 误拦截认证错误** - 排除认证错误(如 invalid_api_key),仅拦截真正的 schema/参数错误,保留多 key 场景下的 failover 能力 - **metadata.user_id JSON 对象兼容** - Claude Code v2.1.78 将 metadata.user_id 从扁平字符串改为 JSON 对象字符串,代理层自动检测并动态拼接为扁平格式 - **schema/参数错误不再触发 failover** - 上游返回不可恢复的 4xx 错误时,不再切换渠道重试,避免同一份坏请求打挂所有同类渠道 --- **Full Changelog**: https://github.com/BenedictKing/ccx/compare/v2.6.38...v2.6.40