- [Disable SSE ': ping' Comment Heartbeat for Gemini Streams to Fix Antigravity CLI Crashes] (Fixes #3952, PR #3953, Thanks to @koeria):
- Antigravity CLI (agy) Streaming Compatibility: Overrode
heartbeat_frameto return empty bytes for native Gemini streams and skipped yielding empty heartbeat frames inrun_stream_lifecycle, eliminating crashes where the Google GenAI Go SDK terminates withiterateResponseStream: invalid stream chunk: : pingupon encountering non-data SSE comment pings. (Fixes #3952, PR #3953, Thanks to @koeria)
- Antigravity CLI (agy) Streaming Compatibility: Overrode
- [Strip Outer Markdown JSON Fences and Align Token Accounting with Reasoning] (Fixes #3951, PR #3954, Thanks to @hazerwin):
- Structured Output Fence Stripping: Supported both string and object syntax for
response_format(json_object/{"type": "json_object"}), establishing regex-safe state machines across streaming and non-streaming channels to strip outerjson` /fences so client-sidejson.loadscalls succeed seamlessly. (Fixes #3951, PR #3954, Thanks to @hazerwin) - Token Accounting Alignment: Summed
reasoning_tokensintocompletion_tokenswithinCanonicalUsage::from_gemini, strictly conforming to the OpenAI standard wheretotal_tokens = prompt_tokens + completion_tokens. (Fixes #3951, PR #3954, Thanks to @hazerwin)
- Structured Output Fence Stripping: Supported both string and object syntax for
- [Scope Competitor Brand Replacement Strictly to Identity Declarations] (Fixes #3940, Ref #3941, PR #3954, Thanks to @sujuxiaoren, @koeria):
- Narrow Brand Sanitization Boundary: Confined
RE_COMPETITOR_BRANDSreplacement strictly to identity declaration clauses, preventing accidental tampering with valid technical terms and competitor references inMEMORY,USER PROFILE, and skill/tool documentation; added decimal-aware sentence splitting to protect model version numbers; executed brand replacement prior to appositive folding to preserve clause integrity. (Fixes #3940, Ref #3941, PR #3954, Thanks to @sujuxiaoren, @koeria)
- Narrow Brand Sanitization Boundary: Confined
- [Gemini 原生流禁用 SSE ': ping' 注释心跳,修复 Antigravity CLI 解析崩溃] (Fixes #3952, PR #3953, Thanks to @koeria):
- [Google 兼容接口支持首尾 Markdown JSON 围栏剥离与 Token 统计口径全对齐] (Fixes #3951, PR #3954, Thanks to @hazerwin):
- 结构化输出围栏剥离:
response_format兼容支持字符串与对象声明(json_object/{"type": "json_object"}),在非流式与流式双通道建立正则安全状态机,自动剥离首尾json` /围栏,确保各类客户端json.loads直接反序列化无异常。(Fixes #3951, PR #3954, Thanks to @hazerwin) - Token 统计全口径对齐: 在
CanonicalUsage::from_gemini中累加思考 Token(reasoning_tokens)至completion_tokens,严格符合 OpenAI 规范并确保total_tokens = prompt_tokens + completion_tokens恒等。(Fixes #3951, PR #3954, Thanks to @hazerwin)
- 结构化输出围栏剥离:
- [提示词清洗作用域收缩至身份归属声明句] (Fixes #3940, Ref #3941, PR #3954, Thanks to @sujuxiaoren, @koeria):
- 收窄竞品厂牌清洗作用域: 将
RE_COMPETITOR_BRANDS归一化限制在身份归属声明句内部,杜绝误伤MEMORY、USER PROFILE及技能/工具文档中的业务厂牌词(如百度坐标系、DeepSeek 评测集等);增加带小数点感知的分句器保护版本号;在同位语改写前执行以维持完整从句边界。(Fixes #3940, Ref #3941, PR #3954, Thanks to @sujuxiaoren, @koeria)
- 收窄竞品厂牌清洗作用域: 将
What's Changed
- fix(proxy): merge object-only anyOf/oneOf unions instead of keeping one branch by @snailb1007 in #3878
New Contributors
- @snailb1007 made their first contribution in #3878
Full Changelog: v5.0.3...v5.0.4-beta.11