Skip to content

fix: make stream idle timeout configurable - #405

Open
msamoilenko wants to merge 1 commit into
lessweb:mainfrom
msamoilenko:pr/timeout
Open

msamoilenko wants to merge 1 commit into
lessweb:mainfrom
msamoilenko:pr/timeout

Conversation

@msamoilenko

Copy link
Copy Markdown

Problem

The stream idle watchdog was hardcoded to 60 seconds. Thinking models can stay silent for longer than that, so valid requests were aborted and retried even when the provider was still working.

Change

  • Add streamIdleTimeoutMs to user/project settings.
  • Default to 180 seconds; accept 30s-30min; invalid values fall back to the default.
  • Use the configured value for the idle watchdog and report the effective timeout in LlmStreamIdleTimeoutError.

Verification

  • npm run check passes.
  • session.test.ts + settings-and-notify.test.ts: 190 passing.
  • CLI suite: 633 passing.

The default changes from 60s to 180s. Users who prefer the old behavior can set streamIdleTimeoutMs: 60000.

The 60s idle watchdog was hardcoded and caused false positives with thinking models. Add streamIdleTimeoutMs (default 180s, range 30s-30min) and report the effective timeout in the error.
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