Skip to content

Commit aa22373

Browse files
authored
One more SecretStr fix (#6419)
1 parent 053723a commit aa22373

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

openhands/core/config/utils.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import toml
1111
from dotenv import load_dotenv
12-
from pydantic import BaseModel, ValidationError
12+
from pydantic import BaseModel, SecretStr, ValidationError
1313

1414
from openhands.core import logger
1515
from openhands.core.config.agent_config import AgentConfig
@@ -192,7 +192,7 @@ def load_from_toml(cfg: AppConfig, toml_file: str = 'config.toml'):
192192
custom_fields[k] = v
193193
merged_llm_dict = generic_llm_fields.copy()
194194
merged_llm_dict.update(custom_fields)
195-
195+
196196
custom_llm_config = LLMConfig(**merged_llm_dict)
197197
cfg.set_llm_config(custom_llm_config, nested_key)
198198

@@ -287,8 +287,10 @@ def finalize_config(cfg: AppConfig):
287287
pathlib.Path(cfg.cache_dir).mkdir(parents=True, exist_ok=True)
288288

289289
if not cfg.jwt_secret:
290-
cfg.jwt_secret = get_or_create_jwt_secret(
291-
get_file_store(cfg.file_store, cfg.file_store_path)
290+
cfg.jwt_secret = SecretStr(
291+
get_or_create_jwt_secret(
292+
get_file_store(cfg.file_store, cfg.file_store_path)
293+
)
292294
)
293295

294296

0 commit comments

Comments
 (0)