Releases: CJackHwang/ds2api
v4.6.1
修复安全性漏洞 GHSA-rf34-c5jc-4ffw
工具解析稳定性补丁
What's Changed
- [codex] fix security advisory and toolcall parsing issues by @CJackHwang in #476
- Fix tool detection when unclosed backtick precedes tool call by @CJackHwang in #480
- [codex] fix WebUI static root path guard by @CJackHwang in #481
Full Changelog: v4.6.0...v4.6.1
v4.6.0
v4.5.0过于吊炸天炸飞了 找到根因了
本版本回退PR #460 的改动 取消4.5.0时引入的全角管道符引起模型工具格式遵循严重不稳定
这个版本应该是历史版本里面工具调用最稳定的,而且429问题和重复调用工具的情况大幅减少了
Version 4.5.0 was so overpowered it was a complete disaster! The root cause has been found.
This version reverts to the changes in PR #460, removing the full-width pipe character introduced in 4.5.0 that caused severe instability in model tool formatting.
This version should be the most stable in terms of tool calls in the past, and the 429 issue and duplicate tool calls have been significantly reduced.
What's Changed
- fix(toolcall): eliminate strings.ToLower panics from Unicode case folding by @waiwaic in #460
- 抽取通用 ASCII 部分前缀匹配以合并重复的 DSML 前缀逻辑 by @CJackHwang in #461
- fix(vercel): align JS stream path guard with Go /chat/completions alias by @CJackHwang in #462
- Align Vercel JS CORS Vary-Origin behavior with Go by @CJackHwang in #463
- docs: clarify Vercel chat-stream supports root
/chat/completionsalias by @CJackHwang in #465 - fix(toolcall): unify DSML delimiter in correct examples by @CJackHwang in #467
- Merge pull request #465 from CJackHwang/codex/review-and-update-project-documentation
docs: clarify Vercel chat-stream supports root /chat/completions alias by @CJackHwang in #466
- feat: tool-call markup parsing resilience — CJK, arbitrary prefixes, control separators, and retry hardening by @CJackHwang in #469
- feat: DSML/CDATA parsing robustness, tool-call resilience, and completion retry improvements by @CJackHwang in #470
- feat(toolcall): harden confusable candidate spans by @LoGGGG240211 in #473
- fix(vercel): 解决 Vercel 环境下启用自动删除会话失效 by @hefengfan0615 in #474
- feat: enhance DSML tool-call parsing drift tolerance and update API docs by @CJackHwang in #475
New Contributors
- @LoGGGG240211 made their first contribution in #473
- @hefengfan0615 made their first contribution in #474
Full Changelog: v4.4.5-2...v4.6.0
v4.4.5-2
What's Changed
- fix(toolcall): avoid lowercasing ignored XML tails by @NgoQuocViet2001 in #457
Full Changelog: v4.4.5...v4.4.5-2
v4.4.5
What's Changed
- fix(toolcall): use len(lower) not len(text) after ToLower to prevent out-of-bounds panic by @waiwaic in #452
修复部分字符计算逻辑错误导致的程序异常
Full Changelog: v4.4.4...v4.4.5
v4.4.4
What's Changed
- fix: auto-detect Vercel for chat history path by @waiwaic in #436
- feat: add Ollama API endpoints /api/version, /api/tags, /api/show for Copilot integration by @dinhnn in #446
- Add Ollama-compatible API endpoints and model capability support by @CJackHwang in #450
- Update by @CJackHwang in #449
New Contributors
Full Changelog: v4.4.3...v4.4.4
v4.4.3
What's Changed
- Add Star History section to README
Added a Star History section with a chart to the README. by @CJackHwang in #416
- fix(webui): 修复 Windows 注册表 MIME 错误导致 /admin 样式失效 by @lwz762 in #418
- feat(admin): remember Vercel sync credentials by @NgoQuocViet2001 in #421
- Dev push by @CJackHwang in #423
- fix(openai): avoid empty choices stream heartbeat by @NgoQuocViet2001 in #430
- Fix OpenAI stream heartbeat and avoid empty choices by @CJackHwang in #431
- Remove heuristic model name resolution and require explicit aliases or canonical IDs by @CJackHwang in #433
- Merge pull request #433 from CJackHwang/codex/flash-searchpro-search
Remove heuristic model name resolution and require explicit aliases or canonical IDs by @CJackHwang in #434
New Contributors
Full Changelog: v4.4.1...v4.4.3
v4.4.1
修复后台无法显示会话记录问题
全渠道均支持查看会话记录 可查看请求格式信息
What's Changed
- [codex] unify response history session management across API backends by @CJackHwang in #415
Full Changelog: v4.4.0...v4.4.1
v4.4.0
更新内容
新的多接口处理架构 提升体验稳定性 继续尽可能对齐原生效果 建议体验此版本
流式性能优化
- 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.Scannertobufio.Readerfor 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
assistantturnandcompletionruntimepackages
Gemini Thinking
- Full thinking block support for Gemini API, enabled by default for supported models
- Fixed
reasoning_contentleak andfinish_reason=nulledge 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
textcleanpackage
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_tokensexceeded
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
- 修复了使用Zeabur部署会失败的问题 by @VanceHud in #403
- feat(openai): retrieve uploaded file metadata by @NgoQuocViet2001 in #404
- perf(streaming): optimize TTFT and reduce buffering latency by @wyv202011y in #406
- v4.4.0: streaming perf + Gemini thinking + DSML parser hardening by @CJackHwang in #408
New Contributors
Full Changelog: v4.3.0...v4.4.0
v4.3.0
更新内容
- 新的历史上下文处理逻辑,减少模型幻觉
- 尝试从接口拒绝非UTF-8输入并限制模型输出
- Vercel路由更新
- 识图模式完整适配
以及其他已知不同AI客户端兼容性问题修复
What's Changed
- Fix: add missing Vercel rewrite rules for admin API routes by @BigUncle in #391
- fix: increase stream timeout constants for large-context models; guar… by @wyv202011y in #392
- Merge pull request #391 from BigUncle/fix/vercel-admin-history-rewrite
Fix: add missing Vercel rewrite rules for admin API routes by @CJackHwang in #393
- feat: enhanced input validation, tool call resilience & performance by @CJackHwang in #398
- [codex] drop obsolete release smoke check by @CJackHwang in #399
New Contributors
- @wyv202011y made their first contribution in #392
Full Changelog: v4.2.1...v4.3.0
v4.2.1
What's Changed
- build: improve Docker robustness and fix potential security issues by @RinZ27 in #349
- feat: parse split context files in list view by @ouqiting in #350
- docs: add Table of Contents to README.MD and README.en.md by @Gingiris in #353
- Fix/tool type schema protection by @shern-point in #352
- Verify GHCR latest tag matches release and show version source/latest in dashboard by @CJackHwang in #356
- Return config persistence warning when config path is read-only; default container config to /data/config.json and update docs by @CJackHwang in #357
- Revert "Verify GHCR latest tag matches release and show version source/latest in dashboard" by @CJackHwang in #358
- fix(openai): keep citation indexes one-based with zero-based references by @NgoQuocViet2001 in #359
- Fix stream compatibility and vision model exposure by @adnxx1wsx in #364
- fix(sse): batch tiny stream chunks before emitting by @CJackHwang in #362
- Restore thinking fallback for tool-call detection and drop history.txt wrapper tags by @CJackHwang in #368
- Merge pull request #368 from CJackHwang/codex/fix-review-issues-for-pr-#364
Restore thinking fallback for tool-call detection and drop history.txt wrapper tags by @CJackHwang in #369
- fix(vercel): align JS stream parser with Go object-shaped content by @CJackHwang in #370
- fix(openai): return 400 for inline file limit by @NgoQuocViet2001 in #373
- Feat/accurate context token length by @shern-point in #372
- Feat/full context file token accounting by @shern-point in #374
- sse/parser: treat object-shaped
vas visible content, preserve INCOMPLETE across omitted status; add tests and samples by @CJackHwang in #375 - feat(openai): add root route aliases by @NgoQuocViet2001 in #378
- Fix failing current-input token accounting test by @CJackHwang in #377
- fix: content being overwritten and left empty by @ouqiting in #385
- Merge pull request #377 from CJackHwang/codex/run-all-tests-and-fix-failures
Fix failing current-input token accounting test by @CJackHwang in #379
New Contributors
- @RinZ27 made their first contribution in #349
- @Gingiris made their first contribution in #353
- @NgoQuocViet2001 made their first contribution in #359
Full Changelog: v4.1.2...v4.2.1