[Bug]: Base URL does not reset to empty after setting it once
Is there an existing issue for the same bug?
- [X] I have checked the troubleshooting document at https://docs.all-hands.dev/modules/usage/troubleshooting
- [X] I have checked the existing issues.
Describe the bug
The Base URL does not get set to empty if you have set it once
Current OpenHands version
main
Installation and Configuration
make build
make run
Model and Agent
N/A
Operating System
MacOS
Reproduction Steps
- In the Settings UI, toggle Advanced Options and set Base URL to "https://test.com"
- Set some random custom_model "openai/gpt-4o"
- If you print the logs for Base URL (I have additional logging PR up which you can use when merged), you will see that base_url is set correctly
- Now remove
Base URLand pressSave
You will see that Base URL is still set to "https://test.com" when it gets passed into the AgentSession (But appears empty in the UI)
Logs, Errors, Screenshots, and Additional Context
No response
Additionally even if you disable Advanced Options, the Base URL will still be set which is incorrect.
I just ran in to this exact same problem, really annoying. Maybe we need to clear the browser cache. @amanape it'd be great if you can take a quick look, I imagine it's pretty simple to fix.
Are you clearing the base URL mid session?
@amanape what do you mean mid session? I launch OpenHands. Open Settings. Make the modifications.
@mamoodi After a little investigation, the initial settings is sent as soon as the session starts. Unless you change the settings and the RESTART or reinitialize the session/OpenHands, the changes will not be reflected.
Instead of taking care of this now, I'll focus on it after #3603 is merged (since it introduces some changes that may solve or require a different approach to solve this problem). It should be ready for your thorough review soon
This is not actually fixed--I just confirmed on main. Will take a look
Confirmed this works. Thanks for fixing!