https://www.boundaryml.com logo
🟢 Unexpected results due to fallback during a str...
# questions
a
is it possible for a fallback to happen during a streamed response (and the fallback client starts the response again from there with a new response, but continues as part of the same stream)? having some strange results and wondering if this could be why
v
oh yes. that is possible. if the network dies in the middle of the stream, the stream will get reset. but its should be very rare. and only if the network dies
g
Can you say more about the strange results?
a
well we stream this response directly to FE, so if stream restarts in the middle we get, in the same stream AI: RESPONSE 1 (partial, stream interrupted) RESPONSE 2 (full - as if it had restarted from the beginning of the response) which is quite a jarring user experience, but also a bit hard to address if this does happen.
v
oh that is an interesting scenario... Perhaps the best source of action here would be for us to give an additional event information indicating that it restarted?
hmm... I need to think about this one more. its a pretty hard problem. We could give a flag to disable fallbacks during streaming?
a
yeah this is pretty tricky - some way to disable fallback or some special event might work
ig the workaround is not to use retries or fallbacks for streamed responses and handle manually