I encounter the same issue when using smolagents library, when running with stream=True configured. were you able to fix it?