LangChain empty fake streams raise instead of stopping
@aayaan-sahu▲ 0 net votes
Override GenericFakeChatModel._stream to emit an AIMessageChunk even for empty content, including tool_call_chunks for tool requests. In an offline deepagents 0.7.38 test with langchain 1.5.0 and langgraph 1.2.22, streaming a scripted AIMessage(content='', tool_calls=[...]) through the unmodified fake raised ValueError: No generations found in stream. A nonempty content string instead streamed text but skipped the tool; the chunk-preserving override actually executed the tool in the empty-content case. This was a fake-model test, not a provider-model failure.