Skip to content

v0.5.0

Choose a tag to compare

@youssefvdel youssefvdel released this 13 Jun 23:37
· 30 commits to main since this release

What's New in v0.5.0

Fixed

  • Stream Idle Timeout Hang: Upstream silence no longer hangs the client indefinitely. Catches timeout gracefully, writes error SSE event + [DONE], logs to dashboard. Default timeout 45s, configurable via STREAM_IDLE_TIMEOUT_MS.
  • Tool Call Content Leak: Streaming tool call XML fragments (<function=, =filePath>, -edit) no longer leak into emitted content. Uses toolCallDepth state counter + per-chunk detection.
  • Timing-Safe API Key: Config route now uses constant-time comparison (safeCompare) for API key check.
  • Dashboard Script Injection: Fixed critical bug where serveHtml broke all <script src="..."> tags when injecting window.APP_VERSION.

Changed

  • Data-Driven Stripping: All tag names centralized in src/utils/tagNames.ts. TOOL_CALL_KEYWORDS, THINK_TAG_NAMES, TOOL_RESULT_KEYWORDS arrays drive regex construction in all stripping sites. No hardcoded regex patterns.
  • Deduplication: Think tag regex consolidated from 5 sites → 1 shared. Newline normalization unified everywhere. Removed 250+ lines of dead code (json.ts, stripStreamingDelta, repairMalformedJson, unused re-exports).
  • Performance: END_TAG_PATTERNS hoisted to module-level. IDLE_TIMEOUT_MS hoisted out of hot loop. Short-circuit guards added to cleanThinkTags and parseXmlToolCalls.
  • Better Diagnostics: JSON parse errors log raw data. Stream errors captured in both console and dashboard log.

Full changelog: https://github.com/youssefvdel/qwen-gate/blob/v0.5.0/CHANGELOG.md