I was spelunking last night and I found a comment ...
# proj-agent
s
I was spelunking last night and I found a comment in the code, wanting for some tests.
Copy code
@staticmethod                                                                                                                                                                                
     def events_to_messages(events: list["LLMConvertibleEvent"]) -> list[Message]:                                                                                                                
         """Convert event stream to LLM message stream, handling multi-action batches"""                                                                                                          
         # TODO: We should add extensive tests for this
So I made some characterization tests. Found a small bug and a bigger question where it looks like the line kinda blurs between condenser summary and human input, I think. 👀 🤔 github.com/OpenHands/software-agent-sdk/issues/4525 github.com/OpenHands/software-agent-sdk/pull/4526
❤️ 1
👀 1
c
Looks right to me 🤔 The Responses API issue may be worth testing on the real LLM; that is, maybe with integration tests - ah, it didn’t work on GH, but I started an agent to try it live.
Interesting that we missed this
I left a few tiny comments on the tests, I think they’re useful, not sure if all of them
🙏 1
Just for the record, the condenser thing is normal… What is less normal IMHO, is that we do this merge at all. Most LLM APIs can do it themselves these days, and don’t require alternating roles, trouble is maybe not all of them so… sometimes we did it, sometimes we removed it, now it looks like it’s back 🫠
🙏 1
m
Thanks… probably this is the oldest todo we had in the sdk 😄
😅 1
s
Y'all are invited to point me toward the next todo if you want. Or we'll just see what I stumble upon.
m
Did you see my msg about sub-agents?
🙏 1
s
Yes, I did! Thank you very much! That's what I was working on when I rabbit-holed here. I wanted to understand the layers better and hit that todo about tests and ended up with a PR. You know how it goes. 😅
👍 1