Elsa Agents: Add service provider discovery endpoint#60
Merged
sfmskywalker merged 3 commits intomainfrom Sep 13, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds a new service provider discovery endpoint and integrates it into the client and UI for dynamic provider selection.
- Introduces a
/ai/service-providersAPI endpoint to list registered providers. - Implements a Refit client interface and fetches provider names in the Blazor UI.
- Replaces hard-coded dropdown items with a localized, dynamically loaded list.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Service.razor.cs | Initialized _serviceProviders and loaded it in OnInitializedAsync. |
| Service.razor | Replaced static <MudSelectItem> entries with a foreach over _serviceProviders. |
| Client/IServiceProvidersApi.cs | Added IServiceProvidersApi.ListAsync to call the new endpoint. |
| Endpoints/ServiceProviders/List/Endpoint.cs | Created endpoint that returns provider names and configured permissions. |
Comments suppressed due to low confidence (2)
src/modules/agents/Elsa.Agents.Api/Endpoints/ServiceProviders/List/Endpoint.cs:18
- The scope
ai/services:readis generic; consider a more specific permission such asai/service-providers:readto match the endpoint path and intent.
ConfigurePermissions("ai/services:read");
src/modules/agents/Elsa.Agents.Api/Endpoints/ServiceProviders/List/Endpoint.cs:22
- This new endpoint isn’t covered by any unit or integration tests; add tests to validate the
/ai/service-providersresponse under normal and error conditions.
public override Task<ListResponse<string>> ExecuteAsync(CancellationToken ct)
sfmskywalker
approved these changes
Jun 9, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
sfmskywalker
approved these changes
Sep 13, 2025
Member
|
Thanks! |
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.
Summary
/ai/service-providersendpointTesting
dotnet test(fails: unable to restore packages - 403 errors)https://chatgpt.com/codex/tasks/task_e_6846babb3930832a94834097ca103d38