Skip to content

Releases: kianwoon/modelweaver

v0.3.53

03 Apr 13:10

Choose a tag to compare

Session Housekeeping

  • Configurable idle TTL — session idle timeout increased from 2min to 10min, configurable via sessionIdleTtlMs in config YAML
  • Graceful drain on shutdown — session connections are synchronously drained on daemon stop/reload
  • Session visibility/api/sessions now returns per-session stats (id, providers, idle time, last activity)
  • Bug fixevict() now properly cleans up empty session entries from the pool

Files changed

  • src/session-pool.ts — configurable TTL, getStats() method, evict cleanup fix
  • src/config.tssessionIdleTtlMs config field (Zod schema)
  • src/types.tsServerConfig interface update
  • src/server.ts — wire config to pool, enrich /api/sessions endpoint
  • src/index.ts — drain session pool on shutdown
  • tests/session-pool.test.ts — 8 new unit tests

v0.3.46

02 Apr 12:29

Choose a tag to compare

What's Changed

Resilience Features

  • feat(resilience): adaptive TTFB, escalating cooldown, and global backoff (#135)
    • Health-score-based TTFB: compose with latency-based via min() so unhealthy providers fail fast
    • Escalating circuit breaker cooldown: double cooldown per flap cycle (cap 60s), reset after 5 consecutive successes
    • Global backoff: return 503 immediately when all providers have health score < 0.5

Bug Fixes

  • fix(proxy): use .end() instead of .write()+.destroy() in stall handler — fixes Node 22 hang
  • fix(test): increase sample count in flaky selectByWeight health blending test
  • fix(test): increase timeout for stall detection test to prevent CI flakes

Full Changelog: v0.3.40...v0.3.46

v0.3.40

01 Apr 17:15

Choose a tag to compare

What's Changed (v0.3.38 → v0.3.40)

Bug Fixes

  • Suppress "socket closed unexpectedly" — Fixed undici's socket close warning leaking to clients during hedge cancellation and stall abort. Unpipe upstream before ending passThrough, consume _intentionalClose flag in error handler, added logging for intentional aborts. (#118, #119)
  • StreamState race conditions — Replaced setInterval stall poll with one-shot setTimeout. Added _stallFired guard. Terminal state guards in all setImmediate blocks. (#100, #116)
  • actualModel ReferenceError — Eliminated redundant parameter to prevent ReferenceError on certain request paths. (#111, #117)
  • undici socket race — Prevented undici socket race condition in hedge/stall stream destruction by unpipe-before-destroy pattern. (#114)
  • GUI duplicated recent requests — Fixed conflicting provider stats and duplicated entries in provider section. (#106, #110)
  • GUI error breakdown — Wire per-provider error counts (502/429) through WebSocket provider_health messages for visibility. (#103, #115)
  • SSE error event ordering — Write SSE error payload before setting stream error state, ensuring client always receives the error text. (#98)

New Features

  • Wizard hedging config — Added hedging config screen (concurrentLimit, windowSeconds, stallTimeout, poolSize) to wizard init. (#95, #96)
  • Provider error display — Show 502/429 errors per provider in the GUI provider section. (#103)

Full Changelog: v0.3.38...v0.3.40

v0.3.38

31 Mar 19:09

Choose a tag to compare

What's Changed (v0.3.36 → v0.3.38)

New Features

  • Config file location choice — Wizard init now supports project-level ./modelweaver.yaml with routing-only overlays. Auto-detects existing configs and offers menu choice. Added --global/--path flags to init subcommand. Config loading merges project modelRouting over global config. (#94)

Bug Fixes

  • Stream state machine race conditions (#98, #99) — Replaced setInterval stall poll with one-shot setTimeout. Added _stallFired guard to prevent handleStall re-entry. nextState() now rejects invalid transitions instead of allowing them. Terminal state guards in all setImmediate blocks in server.ts and data handler.
  • Daemon log-analysis bugs (#82) — Fixed circuit-breaker test assertions for 401 counting. Fixed hot-reload test to await async setConfig.
  • 4 verified daemon issues (#93) — Fixed agent leaks on config errors and hot-reload races. Optimized metrics prune with incremental min-key tracking. Resolved spurious start→start and streaming→streaming state warnings. Fixed cache clearing order during config swap.
  • GUI progress bar stall — Fixed dismissal with CSS transitionend + fallback. Added complete/error WebSocket events for timeout and error paths. Removed MAX_VISIBLE_BARS cap.
  • GUI recent requests — Sort by timestamp (newest first).

Full Changelog: v0.3.35...v0.3.38

v0.3.35

30 Mar 12:00

Choose a tag to compare

What's Changed

Bug Fixes

  • Readablestream double-close race — Fixed race condition in src/proxy.ts streaming response handling that caused 23 uncaught ERR_INVALID_STATE exceptions
  • dist/dist/index.js startup crash — Fixed service-darwin.ts to use centralized resolveEntryScript()
  • "Already running" spam — Suppressed stdout message in non-interactive calls (cron/launchd)

Config Validation UX

  • Structured error messages — Added ConfigValidationError class with per-field details (path, expected type, received value)
  • GUI error banner — Config validation errors now show as a dismissable banner in the GUI with structured field details
  • WebSocket broadcast — Config errors are broadcast to GUI clients via config_error message type

Model Routing

  • Added claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5-20251001 to model routing pointing to GLM provider

GUI Improvements

  • Glow animation speed +50% — Color cycle reduced from 3s to 2s
  • Version fix — Window title now shows correct GUI version (1.0.0) instead of daemon version (0.3.35)

Tests

  • 7 new tests for config validation error formatting

Full Changelog: v0.3.34...v0.3.35

v0.3.34

30 Mar 10:16
5d40f12

Choose a tag to compare

What's New

Apple Intelligence Glow Effect

  • Animated window border glow (purple → indigo → blue → cyan) when requests are active
  • 9px glowing border with 270px inner ambient glow
  • GPU-composited CSS animation — zero JS timers
  • prefers-reduced-motion respected

Daemon Improvements

  • Display running daemon version in GUI footer
  • Circuit breaker and proxy reliability improvements
  • Metrics, router, server, and WebSocket fixes

Full Changelog: v0.3.33...v0.3.34

v0.3.33

29 Mar 13:31

Choose a tag to compare

What's Changed

Bug Fixes

  • Fix ring buffer iteration bug producing wrong stats after buffer wraps
  • Fix CORS origin bypass allowing http://localhost.evil.com to pass
  • Fix WS reconnect timer leak on reconnect
  • Fix WS clientStreamThrottle Map not cleaned on disconnect
  • Fix TTFB/total timeout race condition producing wrong error message
  • Fix init wizard losing ttfbTimeout and circuitBreaker config on re-edit
  • Fix missing content-length header on provider error responses
  • Fix init wizard not backing up config before overwrite
  • Fix .env file permissions (now 0o600)

Validation

  • Add base URL scheme validation (http/https) in init wizard
  • Add API key whitespace trim and validation
  • Add timeout > 0 validation
  • Add TTFB timeout warning when >= total timeout

Code Cleanup

  • Remove dead raceProviders function and stale variables
  • Remove orphaned providerFailedErr function
  • Clear hedge stats on config hot-reload

Test Improvements

  • Add 25 tests for hedging module (LatencyTracker, InFlightCounter, computeHedgingCount, stats)
  • Replace real timers with fake timers in circuit-breaker tests
  • Add TTFB timeout and stall detection tests for proxy
  • Fix file write error handling in init wizard

v0.3.23

28 Mar 16:55

Choose a tag to compare

What's Changed

Features

  • Session metrics & performance indicators — per-model latency, success rate, tokens/sec, cache hit rate in GUI and API
  • Config hot-reload — edit config.yaml and daemon picks up changes automatically (no restart needed)
  • Delta WebSocket mode — efficient WS updates with delta compression
  • Header forwarding — proper passthrough of auth headers to upstream providers
  • Hedging calibration — adaptive hedging thresholds tuned from production CV data (1.5–4.0)

Fixes

  • Fix monitor dist/dist/index.js path doubling bug
  • Fix null guard for passThrough in ReadableStream wrapper
  • Fix undici ReadableStream double-close stall (lowered stallTimeout to 30s)
  • Re-enable delta mode with GUI summary_delta support
  • Skip config write when content unchanged
  • Add exception handlers for foreground mode
  • Use JSON.parse for responsePreview text extraction

Performance

  • Cache modelStats with dirty flag
  • Cap WS drain queue size, replace JSON.stringify comparison
  • GUI: column headers for Active Models, 7-column grid fix
  • GUI: window height increased for 5-row model visibility

Dependencies

  • Bump actions/setup-node 4 → 6
  • Bump actions/checkout 4 → 6
  • Bump hono 4.12.8 → 4.12.9
  • Bump vitest 4.1.0 → 4.1.1
  • Bump undici 7.24.5 → 7.24.6

Full Changelog: v0.3.22...v0.3.23

v0.3.16

25 Mar 20:06

Choose a tag to compare

What's Changed

Features

  • Compact mode toggle — New titlebar button (↑/↓) to hide Providers and Recent sections, auto-resizing window from 520px to 320px. Preference persists across restarts via localStorage.

Improvements

  • Init wizard navigation — Added go-back support with graceful Ctrl+C handling. Users can now choose to re-enter API keys when existing ones are detected instead of auto-accepting.

Files Changed

  • GUI: compact mode (HTML, CSS, JS, Tauri capabilities)
  • Init: improved wizard UX with GoBackError pattern

Full Changelog: v1.0.0...v0.3.16

v0.2.0 — Performance & Real-time GUI

22 Mar 05:10

Choose a tag to compare

Summary

  • Full-stack performance optimization — connection pooling, circuit breakers, adaptive fallback
  • Real-time WebSocket stats — replaced HTTP polling with live updates
  • Reconnecting status indicator — visual feedback during connection events
  • Fallback chain configuration — init wizard now supports multi-provider setup
  • Prompt caching fix — preserved on primary proxy requests
  • Security update — rustls-webpki patched to 0.103.10

What's Changed

Features

  • ✨ Full-stack performance optimization (connection pooling, circuit breaker, adaptive fallback)
  • ✨ Real-time WebSocket stats replacing HTTP polling
  • ✨ Reconnecting status indicator in GUI
  • ✨ Fallback chain configuration in init wizard

Bug Fixes

  • 🐛 WebSocket reconnect hang when connection drops
  • 🐛 Prompt caching preserved on primary proxy requests
  • 🐛 Debounced summary sent after each request for GUI sync
  • 🐛 Daemon tests no longer kill running server

Dependencies

CI & Docs

  • CI: dropped Node.js 18 from test matrix
  • README updated with circuit breaker, adaptive fallback, connection pooling, and API docs

Full Changelog: https://github.com/kianwoonwong/modelweaver/compare/v0.1.8...v0.2.0