Commit Graph
111409 Commits
Author SHA1 Message Date
Paulus SchoutsenandClaude Opus 4.8 77fe61db3e Load the llm integration via the conversation dependency
The Assist API's built-in tools (date/time, calendar, todo, script, live
context, intents) now come from the llm integration's tool platform, so the
llm integration must be loaded for an Assist LLM API to expose them. Add llm
to conversation's dependencies so it loads wherever the conversation stack
(and thus any LLM agent) is active.

This makes the registry tools reach Assist consumers, which surfaces in
anthropic's test_extended_thinking_tool_call: it patched
AssistAPI._async_get_tools to control the tool set, but tools now also come
from the registry. Empty the registry in that test so its tool set stays the
single mock tool.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 01:05:14 -04:00
Paulus SchoutsenandClaude Opus 4.8 ac3a1493aa Register intent LLM tools from the llm integration
Relocate the intent-tool wrapping (and its two prompt fragments,
DEVICE_CONTROL_TOOL_USAGE_PROMPT and the no-timer note) out of AssistAPI
into a core provider registered by the llm integration. This is a
behavior-preserving relocation: every intent that was wrapped before is
still wrapped, with byte-identical tool names and prompt lines.

The new homeassistant/components/llm/intents.py owns IGNORE_INTENTS, the
timer-intent set, the slugify cache and the device-control prompt, and
registers an intent_tools provider in the llm integration's async_setup
(before GetDateTime/live-context so the tool order is unchanged). The
provider reproduces AssistAPI's exposure/timer filtering exactly and only
emits its prompt when entities are actually exposed.

AssistAPI._async_get_tools now returns [] and the api_prompt no longer
hardcodes the device-control or no-timer fragments; the now-unused imports
and helpers are removed. The order-independent parity snapshot
(test_assist_api_snapshot) stays green without regeneration.

llm gains an after_dependencies on intent (its provider uses intent
component helpers, which are safe without intent being set up). mcp_server,
which consumes the assist API directly, now depends on llm so its
registered tools are available.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 00:56:01 -04:00
Paulus SchoutsenandClaude Opus 4.8 fbda9f4fc3 Set up llm integration in dynamic time injection test
test_dynamic_time_injection case 3 relies on the Assist API providing the
GetDateTime tool (which suppresses the dynamic time prompt). Since that tool
now comes from the llm integration's registry rather than being hardcoded in
AssistAPI, the test must set up the llm integration; otherwise GetDateTime is
absent and the time prompt is injected, failing the assertion.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 00:32:39 -04:00
Paulus SchoutsenandClaude Opus 4.8 5802cada22 Register live-context LLM tool from the llm integration
Move GetLiveContextTool and its DYNAMIC_CONTEXT_PROMPT prompt fragment out of
AssistAPI into the llm integration. The tool is now contributed by a registered
provider (with its prompt via LLMTools(prompt=...)) that returns it only when
entities are exposed, reproducing the previous exposure-dependent behaviour.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 00:01:03 -04:00
Paulus SchoutsenandClaude Opus 4.8 f357dd3d49 Await tool platform discovery in calendar/todo LLM tests
test_calendar_get_events_tool and test_todo_get_items_tool set up their
integration last and then called async_get_api before the llm integration's
EVENT_COMPONENT_LOADED-driven platform discovery had registered the provider,
so they passed in the full-file run (later setups cycled the loop) but failed
in isolation / under randomized ordering. Add async_block_till_done() before
async_get_api so discovery completes deterministically.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 23:53:03 -04:00
Paulus SchoutsenandClaude Opus 4.8 1eca57a01b Register script LLM tools from the script platform
Move ScriptTool (and its ActionTool base, the _get_cached_action_parameters
helper and the action-parameters cache it owns) out of AssistAPI into a
script/llm.py tool platform discovered by the llm integration, mirroring
calendar/llm.py and todo/llm.py. ActionTool was used exclusively by
ScriptTool, so the whole unit moves together; helpers/llm.py keeps only the
SCRIPT_DOMAIN import it still needs for _get_exposed_entities.

The provider reuses llm.async_get_exposed_entities to reproduce the exact
exposed-script entities AssistAPI fed the tool, keeping the emitted
ScriptTools byte-identical. The parity snapshot stays unchanged: script was
already set up in test_assist_api_snapshot, so the platform is discovered
without surfacing any new tools.

The ScriptTool tests in test_llm.py now set up the llm component (so the
platform is discovered) and reference the tool and cache via the script
component root (script.llm) to satisfy the component-root import rule.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 23:44:14 -04:00
Paulus SchoutsenandClaude Opus 4.8 0dde553653 Register todo LLM tool from the todo platform
Move TodoGetItemsTool out of AssistAPI into a todo/llm.py tool platform
discovered by the llm integration, mirroring calendar/llm.py. The provider
reuses llm.async_get_exposed_entities to reproduce the exact exposed
to-do list names AssistAPI fed the tool, keeping todo_get_items
byte-identical.

The parity snapshot now sets up the todo component (required to load the
platform), which also registers todo's intent handlers. This additively
surfaces the HassListAddItem/HassListCompleteItem/HassListRemoveItem
intent tools in the snapshot; the moved todo_get_items tool and the
prompt are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 23:30:17 -04:00
Paulus SchoutsenandClaude Opus 4.8 5943b70577 Register calendar LLM tool from the calendar platform
Move CalendarGetEventsTool out of AssistAPI into a calendar/llm.py tool
platform discovered by the llm integration. Add a public
async_get_exposed_entities helper so the provider reproduces the exact
exposed-calendar names AssistAPI fed the tool, keeping the parity snapshot
byte-identical.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 23:19:51 -04:00
Paulus SchoutsenandClaude Opus 4.8 99ee92029d Register GetDateTime LLM tool from the llm integration
Move the GetDateTimeTool class out of AssistAPI's hardcoded built-in list
and register it from the llm integration's async_setup via the tool
registry. Net behavior is unchanged: GetDateTime is still exposed by the
Assist API, it just comes from the registry now.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 23:07:45 -04:00
Paulus SchoutsenandClaude Opus 4.8 717acdf771 Make Assist API parity snapshot order-independent
The v1 tool-platform refactor moves built-in tools and prompt fragments out
of AssistAPI into per-integration registrations, which changes their order
but not their content. Compare the tool set as a name-keyed mapping and the
prompt as a set of lines, so each migration step verifies same-tools /
same-content / same-prompt regardless of ordering. Final ordering parity with
dev is checked separately at the end of the refactor.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 23:01:59 -04:00
Paulus SchoutsenandClaude Opus 4.8 e76d83241e Source AssistAPI tools and prompt from the tool registry
AssistAPI.async_get_api_instance now also pulls registered tool
providers for the assist API, appending their tools and prompt
fragments to the hardcoded built-ins. Purely additive: with no
registrations, behaviour is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 22:43:41 -04:00
Paulus SchoutsenandClaude Opus 4.8 6024f96d56 Add llm integration with tool platform discovery
New system integration that owns the LLM tools platform: its async_setup
drives async_process_integration_platforms(hass, "llm", ...) so integrations
can ship an <integration>/llm.py with an async_setup_tools hook to register
tools, mirroring the intent helper/integration split. The framework (registry,
Tool, APIs) stays in homeassistant.helpers.llm. No tools are registered yet,
so behavior is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 22:39:05 -04:00
Paulus SchoutsenandClaude Opus 4.8 5eec6167cc Add LLM tool registration API and registry
Introduce a per-tool registration layer in helpers/llm.py: an LLMTools
result (tools + optional prompt fragment), a provider callback type, and
async_register_tool_provider / async_register_tool registering into one or
more API ids. Providers are stored in a registry and merged by
_async_get_registered_tools. Nothing consumes the registry yet, so there is
no behavior change (the Assist parity snapshot is unchanged); AssistAPI is
wired to it in a later step.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 22:22:31 -04:00
Paulus SchoutsenandClaude Opus 4.8 184025cfb4 Add Assist API behavior-parity snapshot test
Capture the assembled Assist prompt and the full serialized tool set
(name, description, parameters) for a scenario exercising every built-in
tool type — intents, timer tools, calendar/todo/script tools, GetDateTime
and GetLiveContext. This is the parity net for the upcoming LLM tool
platform refactor: the snapshot must stay identical as tools and intents
move out of AssistAPI into per-integration platforms.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 22:19:09 -04:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
f0c0e937d1 Update hassil to 3.8.0 (#173649)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-12 22:23:14 -05:00
Franck NijhofandGitHub fcf9e6be63 Fix Withings activity sensors using wrong timezone for date comparison (#173640) 2026-06-12 22:36:13 +02:00
Franck NijhofandGitHub 7f0d86bd4f Avoid leaking Immich API key in error logs (#173541) 2026-06-12 21:07:37 +02:00
Franck NijhofandGitHub 96c5774bef Suppress InsecureKeyLengthWarning in HTML5 push notifications (#173551) 2026-06-12 19:04:06 +02:00
Franck NijhofandGitHub 6288905ca5 Disambiguate duplicate channel names in LG Netcast source list (#173560) 2026-06-12 19:03:55 +02:00
Franck NijhofandGitHub 4c1dbec599 Fix Yale Smart Living panic button unique_id for multiple hubs (#173547) 2026-06-12 18:57:44 +02:00
Franck NijhofandGitHub 2a0b5ca895 Sort aliases in LLM prompts for stable prefix caching (#173558) 2026-06-12 18:56:38 +02:00
Sarah SeidmanandGitHub 746c8dd908 Upgrade pydroplet to v2.4.0 (#173615) 2026-06-12 18:53:41 +02:00
Franck NijhofandGitHub dadfea4d62 Return enum values from config_entry_attr template function (#173554) 2026-06-12 18:49:42 +02:00
Franck NijhofandGitHub 53aef99921 Convert JPEG-incompatible image modes to RGB in image upload thumbnail generation (#173538) 2026-06-12 18:49:19 +02:00
Paul BotteinandGitHub 88bd563a2c Bump yoto-api to 4.2.0 (#173606) 2026-06-12 17:43:16 +02:00
Mick VleeshouwerandGitHub c57c8fad16 Bump pyOverkiz to 2.0.1 (#173607) 2026-06-12 16:35:10 +03:00
5932a11e0c Extend cloud system health with connection and certificate diagnostics (#171804)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 09:01:08 -04:00
bkobus-bbxandGitHub 080492c64d Add reactive energy sensors for Blebox energyMeter device (#173504) 2026-06-12 14:47:30 +02:00
bkobus-bbxandGitHub 3b8689637a Add reauth flow and improve error handling for BleBox integration (#173268) 2026-06-12 14:46:47 +02:00
8cd97fc60e Extract setup_light helper for Govee local tests (#167846)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-12 14:40:26 +02:00
Paul BotteinandGitHub 7c9e5ad31b Bump yoto-api to 4.1.0 (#173601) 2026-06-12 14:24:03 +02:00
Erwin DounaandGitHub 540e9a3d3b MELCloud Home add parallel updates (#173587) 2026-06-12 14:11:27 +02:00
ColinandGitHub 11d4b39a9e openevse: Mark as silver (#173550) 2026-06-12 12:28:21 +02:00
Åke StrandbergandGitHub 8379747a5b Add aqvify tests to reach 100% coverage (#173467) 2026-06-12 12:03:13 +02:00
70a54d333c Add OEM support to Hypontech (#173472)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2026-06-12 11:59:07 +02:00
Josef ZweckandGitHub 92b888b11d Translate exceptions in opendisplay (#173582) 2026-06-12 11:49:02 +02:00
Franck NijhofandGitHub 4b50008c73 Fix iCloud RuntimeError on unload by running cancel in executor (#173537) 2026-06-12 10:27:40 +02:00
Franck NijhofandGitHub e4b5fcf539 Convert RainMachine hw_version to string for device registry (#173545) 2026-06-12 09:00:38 +02:00
Franck NijhofandGitHub a2bdf4627f Convert OpenGarage sw_version to string for device registry (#173546) 2026-06-12 08:57:52 +02:00
Franck NijhofandGitHub 42c05f0998 Fix Rituals Perfume Genie sw_version dict passed to device registry (#173552) 2026-06-12 08:30:57 +02:00
ee30356217 Refresh preferred Thread border agent address on OTBR reconnect (#173508)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: puddly <32534428+puddly@users.noreply.github.com>
2026-06-12 07:57:06 +02:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
d8860fc001 Update ruff (#173575)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-12 07:36:07 +02:00
Erwin DounaandGitHub 0bf27ad6be MELCloud Home add sensor platform (#173529) 2026-06-12 07:29:02 +02:00
Franck NijhofandGitHub 2e8e5c63e8 Fix Hue light level sensor crash on None value (#173532) 2026-06-11 23:17:04 +02:00
99096e4b65 Add Litter-Robot 5 basic entity support (#165879)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-11 22:47:45 +02:00
Franck NijhofandGitHub 594bcff43f Fix Hue grouped light icon by adding translation_key (#173536) 2026-06-11 22:45:43 +02:00
e99cb27015 Add has_entity_name and translation keys to blebox entities (#170089)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2026-06-11 22:43:08 +02:00
James MyattandGitHub 2aa1da7216 (bring) Fix docstring (#173451) 2026-06-11 22:32:15 +02:00
Robert ReschandGitHub edbb27a912 Bump gh aw to 0.79.6 (#173553) 2026-06-11 22:28:29 +02:00
Ronald van der MeerandGitHub 4cf5509bc1 Fix Duco system health for multiple loaded entries (#173324) 2026-06-11 22:28:08 +02:00