Skip to content

Check-level timeout does not propagate to nested workflow AI steps #514

@buger

Description

@buger

Bug Description

Setting timeout on a workflow-type check does not propagate to the AI steps inside the nested workflow. When the AI provider (e.g., Gemini) hangs indefinitely on an API call, the check-level timeout does not abort the hung request.

Steps to Reproduce

checks:
  chat:
    type: workflow
    workflow: assistant
    timeout: 120000  # 2 minutes
    args:
      question: "{{ conversation.current.text }}"

When the AI provider hangs (e.g., Gemini API stops responding mid-stream), the timeout: 120000 on the chat check does NOT abort the nested generate-response AI step. The process hangs indefinitely until killed externally.

Expected Behavior

The timeout on the parent workflow check should propagate to nested AI steps, or there should be a way to configure timeouts for nested workflow AI steps from the parent config.

Actual Behavior

  • The generate-response AI step inside the assistant workflow has its own default timeout (30 minutes via config.ai?.timeout || 1800000)
  • The parent check's timeout: 120000 is ignored for the nested workflow
  • The only workarounds are env vars REQUEST_TIMEOUT and MAX_OPERATION_TIMEOUT which are global, not per-check

Workaround

Set REQUEST_TIMEOUT and MAX_OPERATION_TIMEOUT environment variables globally to control AI API call timeouts:

REQUEST_TIMEOUT=90000 MAX_OPERATION_TIMEOUT=180000 npx visor ...

Environment

  • Visor v0.1.175
  • Model: gemini-3-flash-preview (intermittently hangs on API calls)
  • Node.js v22.14.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requestexternal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions