Skip to content

Fix disconnected stream retention#683

Merged
jahooma merged 1 commit into
mainfrom
jahooma/fix-web-server-memory-leaks
May 15, 2026
Merged

Fix disconnected stream retention#683
jahooma merged 1 commit into
mainfrom
jahooma/fix-web-server-memory-leaks

Conversation

@jahooma
Copy link
Copy Markdown
Contributor

@jahooma jahooma commented May 15, 2026

Summary

Fixes memory retention after clients disconnect from long-running web LLM streams.
DeepSeek V4 Flash streams now cancel immediately on disconnect and intentionally skip billing because that model is cheap and free-mode only, while OpenRouter streams keep draining until fallback billing is possible before cancellation.
Limited free-mode provider errors omit full message payloads from telemetry to reduce memory and log pressure.

Validation

  • bun run --cwd web typecheck
  • git diff --check
  • bun run --cwd web test --testPathPattern=deepseek-image-compat

@jahooma jahooma merged commit 08415a2 into main May 15, 2026
35 checks passed
@jahooma jahooma deleted the jahooma/fix-web-server-memory-leaks branch May 15, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant