Skip to content
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

chore: Throw a 404 instead of returning defaults if settings does not exist #6704

Merged
merged 3 commits into from
Feb 12, 2025

Conversation

amanape
Copy link
Member

@amanape amanape commented Feb 12, 2025

End-user friendly description of the problem this fixes or functionality that this introduces

  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

Give a summary of what the PR does, explaining any non-trivial design decisions
This way we can render the modal to enter the settings


Link of any specific issues this addresses


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:4e273c8-nikolaik   --name openhands-app-4e273c8   docker.all-hands.dev/all-hands-ai/openhands:4e273c8

@amanape amanape self-assigned this Feb 12, 2025
@amanape amanape requested a review from tofarr February 12, 2025 17:26
@amanape amanape marked this pull request as ready for review February 12, 2025 17:26
Copy link
Collaborator

@tofarr tofarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarification: Are we sure this is the desired behavior?

By using the DEFAULT_SETTINGS instead of Settings.from_config we mean that the open source environment can no longer specify default keys / models / base urls in the config.toml - these need to be filled in through the UI.

@amanape amanape merged commit ba599c7 into main Feb 12, 2025
17 checks passed
@amanape amanape deleted the ALL-1259/always-404-settings branch February 12, 2025 18:46
@enyst
Copy link
Collaborator

enyst commented Feb 12, 2025

Clarification: Are we sure this is the desired behavior?

By using the DEFAULT_SETTINGS instead of Settings.from_config we mean that the open source environment can no longer specify default keys / models / base urls in the config.toml - these need to be filled in through the UI.

Sorry, what happened with this? It is a good point. Cc: @amanape

@amanape
Copy link
Member Author

amanape commented Feb 13, 2025

@enyst @tofarr I've rarely used the config for frontend settings-related purposes before, but we should now be able to handle all the settings typically returned from the config (for the frontend) directly in the frontend.

Do you see any cases where this might be impractical?

adityasoni9998 pushed a commit to adityasoni9998/OpenHands that referenced this pull request Mar 3, 2025
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 this pull request may close these issues.

4 participants