OpenHands
OpenHands copied to clipboard
Config rework
Not for review yet. It's partially backported (messy stuff) and Claude was playing too much. 😅
This PR proposes a fix, the addition of a new small config for memory, and a few refactorings for readability:
- [x] fix regression when the user has custom llms defined, and an [llm] section: if some attributes are missing from a custom llm definition, but are defined in [llm], it should fallback to those in [llm].
- [x] break up the embeddings part from LlmConfig into a MemoryConfig
- [x] refactoring: we're starting to have too many classes and they have duplicate methods, introduce an ABC
- [x] refactoring: break up the long functions loading from toml and env, into loading per dataclass: each little config knows better what it needs to load and how to deal with some specifics.
- [ ] better documentation.
Great job tackling this! Having more docstrings alone will make a difference.
Hmm... is your branch a bit outdated? 🤔
I thought I did git pull upstream main... 🤷 Maybe it got outdated again because y'all are too fast and hard working! 😅