itsgoingd / itsgoingd/clockwork

Causing SSE streaming when Clockwork is on

Open
#757 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
6k
Forks
333
Avg merge
5m
Merged PRs (30d)
1

Description

Hi, I am building a chatbot using the Laravel AI SDK, and our project has Clockwork installed. We are using Filament and Livewire. When streaming, I get: Stream is not seekable at /var/www/html/vendor/guzzlehttp/psr7/src/Stream.php:227.

Laravel AI returns a non-seekable PSR-7 body, so Clockwork's $responseBody->rewind() call is interfering with the AI streaming.

I had to override LaravelHttpClientDataSource by adding $isSeekable = $event->response->toPsrResponse()->getBody()->isSeekable(); to check whether the body is seekable before calling rewind().

Keen to hear if anyone has similar issues, or what would be the best way to handle it

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at LaravelHttpClientDataSource and trace how Clockwork handles the PSR-7 response body during streaming. Reproduce the issue with a non-seekable Laravel AI stream and Clockwork enabled; done means streaming completes without the seekability error.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.