Files
OpenHands/openhands/events/serialization
openhands 63086831cb Fix circular import in openhands.events.serialization.event
The circular import was caused by openhands.events.serialization.event
importing openhands.llm.metrics at module level, which eventually led
back to openhands.events through the config system.

Changes:
- Remove module-level import of openhands.llm.metrics classes
- Add lazy import in event_from_dict function where metrics are used
- Preserve all existing functionality while breaking the import cycle

This fixes the second circular import in the chain:
events.serialization.event → llm.metrics → config → storage → events

Co-authored-by: openhands <openhands@all-hands.dev>
2025-12-10 02:05:49 +00:00
..