late-queen-51746
05/01/2026, 1:09 PMmodern-fireman-99755
05/01/2026, 1:18 PMlate-queen-51746
05/01/2026, 1:31 PMmodern-fireman-99755
05/01/2026, 1:53 PMopenhands-sdk/openhands/sdk/testing/test_llm.py, you’ll find the TestLLM class. This is the only primitive you need to mock responses, as only the base LLM class makes actual API calls. Since TestLLM extends the LLM class, any changes made to the base class are automatically reflected there.
I get the impression that the gap the 'replay agent' is trying to fill is: 'I have a long, real recorded trajectory and I want to use it as the oracle without hand-writing assertions.'
The only thing TestLLM doesn't provide out of the box is a recorded oracle for observation comparison. However, that feels more like a fixture/utility concern than a reason for a new Agent subclass. We could achieve the same outcome with a ~50-line test helper: load the events, feed each ActionEvent via TestLLM, and diff the resulting ObservationEvent against the recorded one.
PS: We don't use this class so much, so I can see how it might have flown under the radar.late-queen-51746
05/01/2026, 5:46 PMTestLLM class. Looks like a better choice than dedicated Agent subclass. In fact, it is a much better solution in terms of scalability for test cases. I will try to migrate my regression suite to this class.
Thanks for the information @modern-fireman-99755late-queen-51746
05/01/2026, 6:15 PMTestLLM with functionality to load message events from conversation persistence directory. Then integrated it with the test pipeline. It's working out of the box.
This is much more elegant and maintainable solution. Once all functionalities are verified, I will share the code..
Thanks Vasco..