diff --git a/custom_components/llama_conversation/__init__.py b/custom_components/llama_conversation/__init__.py index 23ac936..b8e9eac 100644 --- a/custom_components/llama_conversation/__init__.py +++ b/custom_components/llama_conversation/__init__.py @@ -82,7 +82,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: LocalLLMConfigEntry) -> def create_client(backend_type): _LOGGER.debug("Creating Local LLM client of type %s", backend_type) - return BACKEND_TO_CLS[backend_type](hass, dict(entry.options)) + # Merge entry.data and entry.options - data has connection info, options has model settings + client_options = {**dict(entry.data), **dict(entry.options)} + return BACKEND_TO_CLS[backend_type](hass, client_options) # create the agent in an executor job because the constructor calls `open()` backend_type = entry.data.get(CONF_BACKEND_TYPE, DEFAULT_BACKEND_TYPE)