Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.

v4.4.0

Choose a tag to compare

@CJackHwang CJackHwang released this 02 May 23:43
· 82 commits to main since this release
c32fe30

更新内容

新的多接口处理架构 提升体验稳定性 继续尽可能对齐原生效果 建议体验此版本

流式性能优化

  • TTFT 大幅降低:全新累积缓冲区架构,MinChars=16、MaxWait=10ms、首片即时刷新,显著减少首字延迟
  • SSE 解析器升级:从 bufio.Scanner 迁移到 bufio.Reader,消除边界截断 bug,增量文本通过 toolstream 管道分发
  • 心跳保活:长请求空闲时发送空 completion chunk + keep-alive heartbeat,防止客户端超时断流
  • Assistant turn 语义重构:将 assistant turn 语义和流累积抽成独立包(assistantturn / completionruntime),统一 Claude/Gemini/OpenAI 三协议对接体验

Gemini Thinking 支持

  • Gemini API 完整支持 thinking blocks,支持的模型默认启用
  • thinking 内容在流式响应中正确归位,reasoning_content 不再泄漏

DSML 工具调用解析加固

  • 新增短横线变体(<dsml-tool-calls>)和下划线变体(<dsml_tool_calls>)支持
  • CDATA 内 markdown 围栏误判防护,避免代码块内标签被误解析
  • CDATA 行偏移精确追踪,保证紧凑工具调用内容不丢失
  • Go 端与 Node 端解析器行为对齐

遗留代码清理

  • 移除 legacy compatibility 配置项及对应 UI 组件(58 文件,净删 255 行)
  • 移除 legacy history split 配置,整合进 completion runtime 管道
  • Reference marker 剥离逻辑集中到 textclean 包,消除 4 个协议处理器的重复硬编码

修复

  • Thinking-only 空输出自动重试,使用多轮 follow-up 在同一 DeepSeek session 中重生成
  • 修复 continuation replay 文本重叠,trim 冗余 thinking 和 response 流内容
  • 新增 OpenAI 上传文件元数据检索接口

文档

  • 架构文档补充 artifacts/static/ 目录及 7 个辅助包的说明
  • 新增 DS2API 项目价值说明文档

What's Changed

Streaming Performance

  • TTFT optimization: New accumulation buffer architecture with select loop, MinChars=16, MaxWait=10ms, first-flush-immediate
  • SSE parser upgrade: Migrated from bufio.Scanner to bufio.Reader for robust stream parsing
  • Keep-alive heartbeat: Empty completion chunks prevent client timeout during idle periods
  • Assistant turn refactor: Centralized turn semantics and stream accumulation into assistantturn and completionruntime packages

Gemini Thinking

  • Full thinking block support for Gemini API, enabled by default for supported models
  • Fixed reasoning_content leak and finish_reason=null edge cases

DSML Parser Hardening

  • Hyphenated (<dsml-tool-calls>) and underscore (<dsml_tool_calls>) tag variants
  • CDATA markdown fence resilience — structural markers inside code blocks no longer cause false parses
  • Precise line-offset tracking for compact tool call content preservation
  • Node + Go parser alignment with comprehensive test coverage

Legacy Cleanup

  • Removed legacy compatibility config and UI components (58 files, -255 net lines)
  • Removed legacy history split config, integrated into completion runtime pipeline
  • Centralized reference marker stripping into textclean package

Fixes

  • Thinking-only empty output auto-retry with multi-turn regeneration
  • Continuation replay overlap prevention
  • OpenAI file metadata retrieval endpoint
  • Tail content truncation fix when max_tokens exceeded

Docs

  • Architecture docs: added artifacts/, static/ directories and 7 auxiliary package descriptions
  • New DS2API project value note

Full Changelog: v4.3.0...v4.4.0

New Contributors

Full Changelog: v4.3.0...v4.4.0