From bf34679c7c3d6fa3821c320b5d992b7071992ec7 Mon Sep 17 00:00:00 2001 From: Hariom_Gupta <134048588+HariomGupta0@users.noreply.github.com> Date: Sat, 19 Sep 2026 12:48:55 +0530 Subject: [PATCH] Remove hardcoded tool name from GetLiveContext prompt (#182111) --- homeassistant/components/homeassistant/llm.py | 4 ++-- tests/helpers/test_llm.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/homeassistant/llm.py b/homeassistant/components/homeassistant/llm.py index 2dc81095cf5c..e533580f3071 100644 --- a/homeassistant/components/homeassistant/llm.py +++ b/homeassistant/components/homeassistant/llm.py @@ -45,7 +45,7 @@ NO_ENTITIES_PROMPT = ( DYNAMIC_CONTEXT_PROMPT = ( "You ARE equipped to answer questions about the" " current state of\n" - "the home using the `homeassistant__GetLiveContext` tool." + "the home by retrieving live context." " This is a primary function." " Do not state you lack the\n" "functionality if the question requires live data.\n" @@ -59,7 +59,7 @@ DYNAMIC_CONTEXT_PROMPT = ( ' "What mode is the thermostat in?",' ' "What is the temperature outside?"):\n' " 1. Recognize this requires live data.\n" - " 2. You MUST call `homeassistant__GetLiveContext`." + " 2. You MUST use the provided tool to retrieve live context." " This tool will provide the needed real-time" " information (like temperature from the local" " weather, lock status, etc.).\n" diff --git a/tests/helpers/test_llm.py b/tests/helpers/test_llm.py index fb75012b45f3..3539f34efc12 100644 --- a/tests/helpers/test_llm.py +++ b/tests/helpers/test_llm.py @@ -820,8 +820,8 @@ Static Context: An overview of the areas and the devices in this smart home: ) dynamic_context_prompt = ( "You ARE equipped to answer questions about the" - " current state of\nthe home using the" - " `homeassistant__GetLiveContext` tool. This is a primary" + " current state of\nthe home by retrieving" + " live context. This is a primary" " function. Do not state you lack the\n" "functionality if the question requires live" " data.\nIf the user asks about device" @@ -833,7 +833,7 @@ Static Context: An overview of the areas and the devices in this smart home: ' "What mode is the thermostat in?", "What' ' is the temperature outside?"):\n' " 1. Recognize this requires live data.\n" - " 2. You MUST call `homeassistant__GetLiveContext`. This" + " 2. You MUST use the provided tool to retrieve live context. This" " tool will provide the needed real-time" " information (like temperature from the local" " weather, lock status, etc.).\n"