Skip to content

Adding a custom http client causes stall-stream protection to trigger if request takes too long #1287

@aaronvg

Description

@aaronvg

Describe the bug

I added a custom http client like this:
https://github.com/BoundaryML/baml/pull/1827/files#top

but then my requests to bedrock stopped failing if they took longer than 5s with:

DispatchFailure(
    DispatchFailure {
        source: ConnectorError {
            kind: Timeout,
            source: ThroughputBelowMinimum {
                expected: Throughput {
                    bytes_read: 1,
                    per_time_elapsed: 1s,
                },
                actual: Throughput {
                    bytes_read: 0,
                    per_time_elapsed: 1s,
                },
            },
            connection: Unknown,
        },
    },
)

To fix it I had to disable streamstall protection:
https://github.com/BoundaryML/baml/pull/1877/files

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Don't fail with a timeout

Current Behavior

Fails with an error

Reproduction Steps

Add a custom http client like in: https://github.com/BoundaryML/baml/pull/1827/files#top

Possible Solution

No response

Additional Information/Context

No response

Version

1.85.0

Environment details (OS name and version, etc.)

macos

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.p2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions