Skip to content

Elsa Agents: Add service provider discovery endpoint#60

Merged
sfmskywalker merged 3 commits intomainfrom
codex/add-get-/ai/service-providers-endpoint
Sep 13, 2025
Merged

Elsa Agents: Add service provider discovery endpoint#60
sfmskywalker merged 3 commits intomainfrom
codex/add-get-/ai/service-providers-endpoint

Conversation

@mohdali
Copy link
Member

@mohdali mohdali commented Jun 9, 2025

Summary

  • expose service provider names via new /ai/service-providers endpoint
  • add client interface for service provider API
  • dynamically load service provider names when editing Services
  • localize provider names in dropdown

Testing

  • dotnet test (fails: unable to restore packages - 403 errors)

https://chatgpt.com/codex/tasks/task_e_6846babb3930832a94834097ca103d38

@mohdali mohdali requested review from Copilot and sfmskywalker June 9, 2025 10:58
@mohdali mohdali changed the title Add service provider discovery endpoint Elsa Agents: Add service provider discovery endpoint Jun 9, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-providers API 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:read is generic; consider a more specific permission such as ai/service-providers:read to 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-providers response under normal and error conditions.
public override Task<ListResponse<string>> ExecuteAsync(CancellationToken ct)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sfmskywalker
Copy link
Member

Thanks!

@sfmskywalker sfmskywalker merged commit 30fdb94 into main Sep 13, 2025
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants