Skip to content

Planner LLM Model Name not loaded correctly when Load Config #589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
knowlet opened this issue May 14, 2025 · 0 comments · Fixed by #590
Closed

Planner LLM Model Name not loaded correctly when Load Config #589

knowlet opened this issue May 14, 2025 · 0 comments · Fixed by #590

Comments

@knowlet
Copy link
Contributor

knowlet commented May 14, 2025

Problem Description

When using the WebUI "Load Config" feature to load a previously saved configuration, the planner_llm_model_name field (Planner LLM Model Name) in the agent_settings tab does not correctly display the saved value. Even though the configuration file contains the correct provider and model name, the dropdown in the UI remains blank or shows a default value, requiring users to manually reselect the model.

Root Cause

The planner_llm_model_name field is a dropdown whose available choices depend dynamically on the value of planner_llm_provider.
During the load_config process, the code simply sets the value for each component without ensuring that the provider is set before the model name.
If the provider is not set first, or if the model name value is not present in the current choices, the Gradio dropdown component cannot display the value correctly.
In contrast, the llm_model_name dropdown works as expected because it always has a default provider and choices initialized, so its value is always valid.

Screenshot

Image
knowlet added a commit to knowlet/web-ui that referenced this issue May 14, 2025
Sets the default LLM provider for the planner to "openai" and the default model name to "gpt-4o".

fix browser-use#589
knowlet added a commit to knowlet/web-ui that referenced this issue May 17, 2025
Yields the provider when the agent settings change in
order to run the callback. Also adds a short sleep to wait for
Gradio UI callback.

Fix Planner LLM Model Name not loaded correctly when Load Config browser-use#589
knowlet added a commit to knowlet/web-ui that referenced this issue May 18, 2025
Yields the provider when the agent settings change in
order to run the callback. Also adds a short sleep to wait for
Gradio UI callback.

Fix Planner LLM Model Name not loaded correctly when Load Config browser-use#589

Signed-off-by: knowlet <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant