mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-04-29 03:00:45 -04:00
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>