Skip to content

Commit

Permalink
Claude sneaked something in
Browse files Browse the repository at this point in the history
  • Loading branch information
enyst committed Feb 18, 2025
1 parent 2cf7847 commit 54d3f66
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions openhands/core/config/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,26 +125,19 @@ def load_from_toml(cfg: AppConfig, toml_file: str = 'config.toml') -> None:

# if there was an exception or core is not in the toml, try to use the old-style toml
if 'core' not in toml_config:
# Even without [core], we should still process other sections normally
logger.openhands_logger.debug(
'No [core] section found in TOML, but continuing with other sections'
)
else:
core_config = toml_config['core']
# re-use the env loader to set the config from env-style vars
load_from_env(cfg, toml_config)
return

core_config = toml_config['core']

# load llm configs and agent configs
for key, value in toml_config.items():
if isinstance(value, dict):
try:
if key.lower() == 'extended':
# For ExtendedConfig (RootModel), pass the entire dict as the root value
logger.openhands_logger.debug(
f'Loading extended config with value: {value}'
)
cfg.extended = ExtendedConfig(value)
logger.openhands_logger.debug(
f'Extended config root after loading: {cfg.extended.root}'
)
continue
if key is not None and key.lower() == 'agent':
# Every entry here is either a field for the default `agent` config group, or itself a group
Expand Down

0 comments on commit 54d3f66

Please sign in to comment.