Skip to content

Embedded mode: delegate /api/providers/status to the host via a ProviderStatusSource SPI #310

Description

@ling-senpeng13

Context

PR #309 added GET /api/providers/status — the server-side source of truth that agentspan doctor renders instead of guessing from the client shell's environment.

In embedded mode (agentspan.embedded=true, e.g. orkes-conductor) the endpoint deliberately returns:

{"managedByHost": true, "providers": []}

and performs no isProviderConfigured calls or reachability probes. This is correct-but-minimal: when embedded, Conductor is the authority for model providers (integrations API + host credential store via the CredentialStoreProvider SPI), and any per-provider answer computed from agentspan's own maps would be the confident-but-wrong reporting PR #309 exists to eliminate (ProviderValidator already defers for the same reason). Doctor renders it as "Provider configuration is managed by the host platform."

Follow-up

Make embedded deployments return real per-provider status by delegation instead of an empty list:

  • Add a small ProviderStatusSource SPI to conductor-agentspan (one method returning the provider status list).
  • Standalone default bean implements the current logic (moved out of ProviderController).
  • The orkes embed config (AgentSpanEmbeddedConfig) contributes a Conductor-backed bean that lists configured AI-model integrations from the host's integration store, probing URL-based providers from the server's network.
  • ProviderController injects whichever bean is present. The wire contract is already forward-compatible: managedByHost stays true, providers fills in — no client changes needed (doctor can render both).

Sequencing

Do this alongside the orkes embed's agentspan version bump: the current embed pins agentspan 0.3.0 and does not serve this endpoint at all yet (doctor hits the labeled "older server" fallback, which degrades gracefully). The host-side bean lands in the orkes repo; the SPI lands here.

🤖 Generated with Claude Code

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions