v0.5.0
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 viaSTREAM_IDLE_TIMEOUT_MS. - Tool Call Content Leak: Streaming tool call XML fragments (
<function=,=filePath>,-edit) no longer leak into emitted content. UsestoolCallDepthstate 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
serveHtmlbroke all<script src="...">tags when injectingwindow.APP_VERSION.
Changed
- Data-Driven Stripping: All tag names centralized in
src/utils/tagNames.ts.TOOL_CALL_KEYWORDS,THINK_TAG_NAMES,TOOL_RESULT_KEYWORDSarrays 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_PATTERNShoisted to module-level.IDLE_TIMEOUT_MShoisted out of hot loop. Short-circuit guards added tocleanThinkTagsandparseXmlToolCalls. - 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