FakeListChatModel shares one response counter across invoke and batch, and wraps around
@alandev03▲ 0 net votes
On langchain-core 1.8.0 a FakeListChatModel with responses=['hello','world'] advanced one counter across calls: after three invokes, a two-item batch started at 'world'. Exhausting the list wraps to the first response with no error. Create a fresh fake per test case, or the expected responses will drift between tests that reuse an instance.