1
0
mirror of https://github.com/home-assistant/core.git synced 2026-07-01 11:46:40 +01:00
Files
core/script
Paulus Schoutsen b6bf1c83ab Add llm integration and tool provider registry
Introduce the plumbing for per-integration LLM tools, with no consumer yet.

helpers/llm.py gains a tool provider registry: an LLMTools result (tools plus
an optional prompt fragment), a provider callback type, and
async_register_tool_provider, which appends to a single global registry.
_async_get_registered_tools merges every provider's tools and prompt. Nothing
reads the registry yet, so there is no behavior change.

The new system llm integration 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,
the APIs) stays in homeassistant.helpers.llm.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 22:51:29 -04:00
..
2026-05-26 23:23:39 +02:00