Skip to content

Commit 9535aaf

Browse files
committed
update
1 parent 5a25e6f commit 9535aaf

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

openhands-sdk/openhands/sdk/conversation/impl/local_conversation.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -463,18 +463,11 @@ def _switch_model_profile(self, profile_name: str) -> None:
463463
FileNotFoundError: If the profile does not exist.
464464
ValueError: If the profile is corrupted or invalid.
465465
"""
466-
store = LLMProfileStore()
467-
new_llm = store.load(profile_name)
468-
469-
usage_id = f"model-profile-{profile_name}"
470-
try:
471-
new_llm = self.llm_registry.get(usage_id)
472-
except KeyError:
473-
new_llm = new_llm.model_copy(update={"usage_id": usage_id})
474466
usage_id = f"model-profile-{profile_name}"
475467
try:
476468
new_llm = self.llm_registry.get(usage_id)
477469
except KeyError:
470+
store = LLMProfileStore()
478471
new_llm = store.load(profile_name)
479472
new_llm = new_llm.model_copy(update={"usage_id": usage_id})
480473
self.llm_registry.add(new_llm)
@@ -492,7 +485,9 @@ def _emit_model_info(self) -> None:
492485
except Exception:
493486
profiles = []
494487

495-
profile_list = ", ".join(profiles) if profiles else "none"
488+
profile_list = (
489+
", ".join([Path(p).name for p in profiles]) if profiles else "none"
490+
)
496491
info_text = (
497492
f"Current model: {current_model}\nAvailable profiles: {profile_list}"
498493
)

0 commit comments

Comments
 (0)