Skip to content

[Chore] Generation timeout fallback duplicated between send() and _runAgentTurn with different values #72

Description

@ASahu16

Problem

The client-side generation timeout is derived independently in two places in lib/features/chat/presentation/chat_notifier.dart (around line 592), with different non-vision fallback values — 60s in send() vs. 120s in _runAgentTurn — and no shared constant.

Why this matters

A future timeout-tuning change applied to one code path (plain chat) is easily forgotten in the other (agent/tool-call loop), leaving the two flows silently inconsistent for the same kind of request. The vision-specific 300s bump (#57) is duplicated the same way.

Found during v1.2.0 release-readiness code review of the main...develop diff.

Fix direction

Factor the timeout derivation (vision vs. non-vision, and whichever fallback values are actually intended for each flow) into one shared helper/constant used by both send() and _runAgentTurn.

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

    agentAgent harnesschatChat feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions