[voice] Add REST endpoint to get LLM tools#5654
Merged
Merged
Conversation
Signed-off-by: Florian Hotze <dev@florianhotze.com>
e48158e to
29353a3
Compare
Contributor
Author
|
@holgerfriedrich Can you please have a look at this PR? It's only a new REST endpoint and I need it for the chat UI (which BTW is finished, just waiting for this endpoint). |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new REST API endpoint under the existing voice REST resource to expose available LLM tools (id/label/description) for clients, along with DTO/mapping support and a unit test.
Changes:
- Extend
VoiceResourcewithGET /voice/llmtoolsreturning a JSON list of tools (localized viaAccept-Language). - Add
LLMToolDTOandLLMToolMapperto convertLLMTooldomain objects to REST DTOs. - Update
VoiceResourceTestto cover the new endpoint.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| bundles/org.openhab.core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/VoiceResource.java | Injects LLMToolRegistry and adds GET /llmtools endpoint returning mapped DTOs. |
| bundles/org.openhab.core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/LLMToolMapper.java | New mapper from LLMTool to LLMToolDTO. |
| bundles/org.openhab.core.io.rest.voice/src/main/java/org/openhab/core/io/rest/voice/internal/LLMToolDTO.java | New OpenAPI-annotated DTO representing an LLM tool for REST responses. |
| bundles/org.openhab.core.io.rest.voice/src/test/java/org/openhab/core/io/rest/voice/internal/VoiceResourceTest.java | Updates constructor usage and adds a unit test for getLLMTools. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Contributor
Author
|
@holgerfriedrich Addressed Copilot review 👍 |
holgerfriedrich
approved these changes
Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.