OpenHands
OpenHands copied to clipboard
Send `LLM_MODEL` to frontend
The LLM_MODEL setting defines the default model to use when no other model is selected in the frontend.
When first initialized, the frontend needs a model selected in the settings dialog. Currently this is hardcoded to gpt-4-0125-preview. Since the frontend now sends this model as an initialization argument to the backend, the LLM_MODEL setting is effectively not respected.
To fix, the backend should send LLM_MODEL to the frontend. If there is no model key in localStorage, it should be initialized with the value of LLM_MODEL.
How does the backend send the value of LLM_MODEL to the frontend? Are you thinking that's a new endpoint?
Yes.