Agentic.LLM.ProviderRegistry (agentic v0.2.2)

Copy Markdown

Hybrid provider registration: compile-time list from config :agentic, providers: [...], runtime enable/1 and disable/1 calls.

Disabled state persists to the host's config via an optional callback (worth uses Worth.Config).

Boot sequence

  1. Reads Agentic.Config.providers/0 for the compile-time list.
  2. Marks providers as :enabled unless previously disabled.
  3. Exposes list/0, enabled/0, enabled?/1, get/1.

Summary

Functions

Returns a specification to start this module under a supervisor.

Disable a provider by id.

Enable a provider by id.

List only enabled providers.

Check if a specific provider is enabled.

Get the module for a provider id. Returns nil if not registered.

List all registered providers (enabled and disabled).

Register a provider module at runtime.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

disable(provider_id)

Disable a provider by id.

enable(provider_id)

Enable a provider by id.

enabled()

List only enabled providers.

enabled?(provider_id)

Check if a specific provider is enabled.

get(provider_id)

Get the module for a provider id. Returns nil if not registered.

list()

List all registered providers (enabled and disabled).

register(module)

Register a provider module at runtime.

start_link(opts \\ [])