Skip to content

Agent activity timer keeps running after stream error or cancellation #505

@harz05

Description

@harz05

Follow-up to #475.

Description

When a chat message results in a server error or is cancelled mid-stream, the "Agent Activity" timer in the trace header keeps counting up indefinitely. It never stops, even after the error message is rendered and the stream is done.

Steps to reproduce

  1. Set a bad/fake API key via the API Keys tab (restored in fix api keys tab in chat settings #475)
  2. Send a chat message
  3. Observe the Agent Activity timer on the response, it runs forever

It should be noted that, I observed this issue after the fix for #475.

Expected behavior

Timer should stop and freeze at the elapsed time as soon as the stream ends, whether by final event, error event, cancelled event, or an exception (abort/timeout).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions