I agree the code quality is questionable, since like.. as a new user, I really shouldn't be able to find mistakes and give a PR to address obvious bugs on my first use https://github.com/langchain-ai/langchainjs/pull/3189
related question, if you don't actually "need" to stream your response back to the client, is there any real benefit to doing streaming instead of awaiting for the full response? (My guess is it's better to not stream if you don't need to, since that would cause more CPU usage on the Worker.)
yeah probably better to not stream if you don't need it but with OpenAI we have seen weird issues and actually stream everything even if we just buffer in the worker
don't stream but it's possible it was happening with streaming too because by the time I added logging and pushed it the behavior went away but I was thinking there was some sort of network timeout happening between CF and Workers without streaming. it was strange