Resolves which agent provider module to use based on configuration.
Provider declarations live in MingaAgent.ProviderRegistry. The resolver preserves the existing :auto and :native behavior while also accepting registered string provider ids for future provider packs.
Summary
Functions
Returns the configured model string, or nil to use the provider's default.
Resolves the provider module based on the current config.
Resolves a specific provider preference.
Types
@type preference() :: :auto | :native | String.t()
Provider preference accepted by config and callers.
@type resolved() :: MingaAgent.ProviderResolver.Resolved.t()
Resolved provider information.
Functions
@spec configured_model() :: String.t() | nil
Returns the configured model string, or nil to use the provider's default.
@spec resolve() :: resolved()
Resolves the provider module based on the current config.
The application :test_provider_module override keeps top precedence so tests can avoid mutating the daemon provider registry.
@spec resolve( preference(), keyword() ) :: resolved()
Resolves a specific provider preference.