(Side question: could we have a channel eng-archit...
# dev-help
c
(Side question: could we have a channel eng-architecture? It sure can be useful, and it's not really a topic covered by any other channels) With the merge of Rohit's LLMRegistry PR, we now track all LLMs running in the system, with a mapping `service -> current LLM`(for example, we know what the 'agent' LLM is; the 'condenser' LLM etc). This allows us to make other steps: - LLM routing, which currently, in Hoang's PR, means to switch from a main 'agent' LLM to a 'secondary' agent LLM and back - LLM switching for other criteria than router (e.g. user-selected, or programmatically) But what exactly does it mean to switch LLM? It seems to me it can mean one of two things: 1. switch LLM configuration, in the LLM instance mapped in the LLMRegistry - the LLM instance is reconfigured, fully, with the new LLMConfig - the registry notifies observers (e.g.
ConversationStats
) that the LLM configuration changed (and from/to what config), so that it can do its stats - this means that client code, like agent, condenser, can be completely unaware of LLM switching, and just use its
self.llm
. The register/switch/notify mechanism will send new calls to the reconfigured LLM. For option 1, I have a PR here to see how it looks like: - https://github.com/All-Hands-AI/OpenHands/pull/9800 - it's actually a very simple PR (though it might not be obvious in github UI): it decouples all configuring code from LLM
init
- so that the
LLMRegistry
can call
llm.reinit
in its switch handler => reinit resets all config of the LLM instance and replaces it with the new configuration. 2. create a new LLM instance, and switch it in the LLMRegistry mapping - the registry notifies
ConversationStats
that the active LLM for a particular service is now different (from/to what LLM) - this raises a question though: client components, like agent, condenser, hold a
self.llm
instance, which has now become stale. How do they know that it's stale? For option 2, it seems to me we have two ways to answer how to handle stale: 2.1 make agent / condenser / etc, all llm-using components in the system, also observers of the LLMRegistry, like ConversationStats 2.2 give them a
self.llm_registry
instead of a
self.llm
, so they always have to use
registry.get_llm()
instead of instances. What do you think? Cc: @chilly-france-44439 @full-greece-2387 @quick-window-91705
šŸ™Œ 2
q
I like 2.2 as an option, it seems the easiest to execute
l
I’d love to have an eng-architecture channel, these messages seem weird on eng-help
šŸ™ 1
q
cc: @purple-thailand-64770 who has been thinking about the channel sprawl and @gentle-apple-32922 who may also be interested. Discuss a design change is a pretty different thing than wanting help I agree. And yet there are quite a few channels already, worth thinking if there are any we should cut as we add more
šŸ‘€ 1
l
I think eng-app would also be OK, for app-based instead of agent-based things. ui-ux is also kinda part of app, but a different set of people (designers/frontend) talk about it
g
Yeah community members are also discussing on this thread too https://openhands-ai.slack.com/archives/C06P5NCGSFP/p1756325991262619 just some things to think over but i think we can definitely improve the experience for everyone