gproxy v2.4.0
v2.4.0
Adds automatic conversation-aware route affinity, Cline and OpenCode channels, client-scoped rewrite rules, and actionable credential health controls, with fixes for transformed streams, GrokBuild, and upstream response capture.
English
Added
- Automatic conversation affinity. Routes configured with
affinity.subject: "conversation"derive a stable conversation-head fingerprint for OpenAI Chat/Responses (including Responses WebSocket), Claude Messages, and Gemini GenerateContent. An explicitx-gproxy-session-idremains highest priority; requests that cannot be safely fingerprinted fall back to user-key affinity. Raw prompt contents are not stored. - Optional route re-anchoring.
affinity.reanchor_after_secsperiodically returns an active subject to the route's normal selection strategy, helping weighted and failover routes rebalance after recovery while retaining the existing rolling idle TTL. Both affinity options are available in the Console. - Cline channel. Cline account tokens and workspace API keys can now use the Cline inference gateway, including device login, token refresh, model routing, and account credit reporting.
- OpenCode Zen and Go channels. Both OpenCode gateway tiers are supported with their native Chat, Responses, Claude, and applicable Gemini surfaces, managed-config login, and tier-specific model routing.
- Credential health controls. The Console now shows per-model health details and can clear credential-wide or model-specific breaker state through dedicated Admin API endpoints.
Fixed
- Cross-protocol aggregate transforms. Routed requests now preserve the correct source and target kinds when an aggregate route crosses protocol families.
- Converted stream lifecycles. Streaming conversions consistently handle start, delta, usage, completion, error, and abnormal EOF events without duplicated or synthetic success frames.
- GrokBuild compatibility. OAuth proxy authentication, Responses transports, and billing/usage presentation now match the upstream service.
- Upstream response capture. Buffered and failed upstream response bodies are retained for diagnostics while continuing to apply redaction.
Changed
- Rewrite rules can target the originating client.
filter_header_patternis now a case-insensitive regular expression matched against the original inbound request headers. Console application presets are scoped so one client's compatibility rewrites do not affect other clients sharing the provider. - Release publication is serialized. Concurrent staging and versioned publishing can no longer race while replacing GitHub Release assets.
简体中文
新增
- 自动对话粘性。 将路由配置为
affinity.subject: "conversation"后,GPROXY 会为 OpenAI Chat/Responses(含 Responses WebSocket)、Claude Messages 和 Gemini GenerateContent 自动生成稳定的对话头指纹。显式的x-gproxy-session-id仍具有最高优先级;无法安全识别对话时会回退到 user key 粘性,且不会存储原始 prompt 内容。 - 可选路由重新锚定。
affinity.reanchor_after_secs可让活跃 subject 定期重新参与路由的正常选路,帮助 weighted 与 failover 路由在成员恢复后重新平衡,同时保留现有的滚动空闲 TTL。两项粘性配置均可直接在 Console 中设置。 - Cline 渠道。 现在可使用 Cline 账户 token 或 workspace API key 接入 Cline 推理网关,并支持设备登录、token 刷新、模型路由和账户余额展示。
- OpenCode Zen 与 Go 渠道。 两种 OpenCode 网关套餐均已支持,可使用其原生 Chat、Responses、Claude 及适用的 Gemini 接口,并支持 managed-config 登录和按套餐区分的模型路由。
- 凭证健康控制。 Console 现在会展示逐模型健康详情,并可通过专用 Admin API 清除整项凭证或指定模型的 breaker 状态。
修复
- 跨协议聚合转换。 聚合路由跨越不同协议族时,现在会保留正确的来源与目标 kind。
- 转换后流生命周期。 流式转换会一致处理开始、增量、用量、完成、错误与异常 EOF,不再重复事件或补出伪成功帧。
- GrokBuild 兼容性。 OAuth 代理认证、Responses 传输以及计费/用量展示现已与上游服务对齐。
- 上游响应捕获。 缓冲响应和失败的上游响应正文会在继续执行脱敏的前提下保留,方便排查问题。
变更
- 改写规则可按原始客户端生效。
filter_header_pattern现为大小写不敏感的正则表达式,并匹配原始下游请求 header。Console 的应用预设已分别限定客户端,避免共享同一 Provider 时互相影响。 - 发布流程串行化。 staging 与正式版本并发发布时,不再竞争替换 GitHub Release 资源。