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

[Bug]: Configuration behavior is unpredictable #3220

Open
2 tasks done
khushvind opened this issue Aug 2, 2024 · 3 comments
Open
2 tasks done

[Bug]: Configuration behavior is unpredictable #3220

khushvind opened this issue Aug 2, 2024 · 3 comments
Labels
bug Something isn't working configuration Related to configuring OpenHands settings large effort Estimated large effort severity:medium Affecting multiple users

Comments

@khushvind
Copy link

khushvind commented Aug 2, 2024

Is there an existing issue for the same bug?

Describe the bug

When I change the model, and api_key in config.toml, OpenDevin still runs with the previous model, and api_key specified in the last session. To use the new model and key, I also need to specify them again in the UI.

Specifying it once should be enough.

Current OpenDevin version

0.8.2

Installation and Configuration

make build; make run

Model and Agent

Model: claude-3-5-sonnet
Agent: CodeActAgent

Operating System

No response

Reproduction Steps

No response

Logs, Errors, Screenshots, and Additional Context

No response

@khushvind khushvind added the bug Something isn't working label Aug 2, 2024
@neubig
Copy link
Contributor

neubig commented Aug 2, 2024

We had a discussion on slack: https://opendevin.slack.com/archives/C06U8UTKSAD/p1722599155702189

Based on the discussion some of my personal suggestions for how we could improve the behavior now:

First, make consistent behavior of configuration:

  1. Read from the defaults specified in config.py in the OpenDevin repo
  2. Read from config.toml and override settings
  3. (optional) Read from environment variables and/or command line and override settings

Here, 3. increases complexity, but it also could be handy because it allows overriding settings without writing to a file (e.g. for sensitive API keys).

Second, make UI-changed settings overwrite config.toml. This would allow the settings to be saved to and read from a consistent place.

@neubig neubig changed the title [Bug]: After changing model, and api_key in config.toml, OpenDevin still runs with the previous model, and api_key specified in the previous session. [Bug]: Configuration behavior is unpredictable Aug 2, 2024
@mamoodi mamoodi added the large effort Estimated large effort label Aug 4, 2024
@HenrikBach1
Copy link

Plz consider that your environment settings when using them in Dockerfile configuration use case, will be invalid as they are as of today in #3196.

@neubig neubig added the severity:medium Affecting multiple users label Sep 4, 2024
@github-actions github-actions bot added the Stale Inactive for 30 days label Oct 5, 2024
@neubig neubig removed the Stale Inactive for 30 days label Oct 5, 2024
@enyst enyst mentioned this issue Oct 15, 2024
1 task
@github-actions github-actions bot added the Stale Inactive for 30 days label Nov 4, 2024
@neubig neubig removed the Stale Inactive for 30 days label Nov 4, 2024
@github-actions github-actions bot added the Stale Inactive for 30 days label Dec 5, 2024
@enyst enyst removed the Stale Inactive for 30 days label Dec 5, 2024
@github-actions github-actions bot added the Stale Inactive for 30 days label Jan 6, 2025
@neubig neubig removed the Stale Inactive for 30 days label Jan 6, 2025
@github-actions github-actions bot added the Stale Inactive for 30 days label Feb 6, 2025
@mamoodi mamoodi added configuration Related to configuring OpenHands settings and removed Stale Inactive for 30 days labels Feb 10, 2025
@neubig neubig marked this as a duplicate of #6857 Feb 22, 2025
@All-Hands-AI All-Hands-AI deleted a comment from github-actions bot Feb 24, 2025
@All-Hands-AI All-Hands-AI deleted a comment from github-actions bot Feb 24, 2025
@All-Hands-AI All-Hands-AI deleted a comment from github-actions bot Feb 24, 2025
@All-Hands-AI All-Hands-AI deleted a comment from github-actions bot Feb 24, 2025
@All-Hands-AI All-Hands-AI deleted a comment from github-actions bot Feb 24, 2025
@enyst
Copy link
Collaborator

enyst commented Feb 24, 2025

First, make consistent behavior of configuration:

  1. Read from the defaults specified in config.py in the OpenDevin repo
  2. Read from config.toml and override settings
  3. (optional) Read from environment variables and/or command line and override settings

Here, 3. increases complexity, but it also could be handy because it allows overriding settings without writing to a file (e.g. for sensitive API keys).

I think the current situation is, when running via:

  • headless (main.py) - this works ✅
  • cli.py - works ✅
  • web UI - doesn't read any of it ❌
  • resolver - not sure ❔
  • external scripts - depends on scripts, evals explicitly do their own thing, except for custom llm configs, which they read from toml

Second, make UI-changed settings overwrite config.toml. This would allow the settings to be saved to and read from a consistent place.

Currently: (new from the time of this topic)

  • UI saves settings in the filestore (locally, on local machine by default)
    • but it's a new format, a .json file
    • the toml file can be loaded from a particular location, but that feature is unused AFAIK
  • has config handling in server module, not config module

Related:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working configuration Related to configuring OpenHands settings large effort Estimated large effort severity:medium Affecting multiple users
Projects
None yet
Development

No branches or pull requests

5 participants