Uh oh!
There was an error while loading. Please reload this page.
Fix url key of createFileOutput options for streaming - #350
Conversation
rovo89
commented
Nov 4, 2025
I have just spend at least two hours trying to find out what I'm doing wrong, trying to write the output to a file. Besides the fact that @zeke Could you merge at least this part of the suggested change? Not sure about the other half and the types, but for the wrong call there is no workaround. Thanks! |
The file streaming API is hosted at https://stream.replicate.com/v1/files so we can use this prefix to determine that the response will contain file entities. This is far cleaner than relying on the event contents.
aron
commented
Nov 14, 2025
Thanks all for your contributions here. You're right this is a bug in the streaming logic. I've added some tests to verify the new behavior. Otherwise this looks great to me! |
97b292c to
5e03835CompareUh oh!
There was an error while loading. Please reload this page.
aron
commented
Nov 14, 2025
I will cut a new release shortly. |
aron
commented
Nov 17, 2025
This has now been released as 1.4.0 |
Currently, if you try to stream files you get a FileOutput instance in the following state:
This is because a
{ data, fetch }object is passed tocreateFileOutput, which expects a{ url, fetch }object.I also noticed that FileOutput is always used for streaming, so I added the useFileOutput option to the
*streamfunction and set the value ofReplicate.useFileOutputas default.