Skip to content

Is there any way to send ping/pong heartbeat message with data stream protocol #9655

@lgrammel

Description

@lgrammel

Discussed in #9650

Originally posted by ChikaFujiwara October 19, 2025
Hi, I have met the situation that one of my function call takes a lot time, which may be more than 60s. Cloudflare and load balance think the connection is idle and diconnect it.
Is there anyway I can send ping/pong through the data stream protocol? I try to add { type: "pong" } on my server stream but it seems break the whole stream and I can not get any event after this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai/providerrelated to a provider package. Must be assigned together with at least one `provider/*` labelprovider/gatewayIssues related to the @ai-sdk/gateway provider

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions