Skip to content

Stream-start timeout is shown to the user as a raw error instead of failing over #1740

Description

@code-yeongyu

Summary

When the provider accepts a request but never emits a first stream event, the session's visible outcome is the watchdog string Provider stream start timed out after <n>ms (optionally with the retry.provider.streamStartTimeoutMs hint). Same-model retries may run, but the turn does not fail over unless retry.fallbackChains has an explicit key for the current model. There is no shipped default chain. Start-time model-profile rungs are not used mid-session. The process stays up; this is not an uncaughtException crash.

Observed

  • Assistant / error line: Provider stream start timed out after 180000ms (bare prefix; current builds also append a setting hint).
  • 180000 is not the shipped start default (300000, clamped to the idle timeout). It is an explicit retry.provider.streamStartTimeoutMs or min(300000, idle) where idle is 180000 via httpIdleTimeoutMs or retry.provider.timeoutMs.
  • No transparent switch to another model. Session remains on the failed turn.

Expected

  1. Process and session stay alive.
  2. Dead request is aborted at the stream-start bound; same-model retry spends the configured budget without shrinking that bound.
  3. If another model is available (configured retry.fallbackChains or a later model-profile / category rung), switch to it and show the fallback notice. A successful fallback answer is the outcome.
  4. If nothing else can serve, show a recovery message: provider never started streaming, N attempts spent, configure /fallback and/or raise retry.provider.streamStartTimeoutMs (0 disables). Do not leave the raw watchdog interpolation as the only visible line.
  5. Failed stall assistants must not remain the visible answer while retry or fallback continues.

Related

Notes for maintainers

Decision point: RetryFallbackController.nextCandidate returns undefined and logs no_chain when resolveChainKey finds no exact/base key. DEFAULT_FALLBACK_CHAINS is empty. TUI prints Error: ${message.errorMessage} for assistant stopReason: "error".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions