Provider registry. Selects the SuperPi.AI.Provider that serves a model.
Resolution order:
- In mock mode (
config :super_pi, mock_llm: true) onlySuperPi.AI.Providers.Mockis active. Mock mode is for tests and demos. It never turns on by itself. - Otherwise the first provider in
config :super_pi, :providerswhosehandles?/1returns true serves the model. The default list is Gemini, Anthropic and OpenAI. A provider with no key is listed in the catalog as not available. - If that provider is not configured, or no provider handles the model, the result is an error. There is no silent fallback.
Summary
Functions
Providers that can serve requests now.
Model catalog of all registered providers, with the provider id and availability.
Human-readable message for a resolution error.
Providers registered in the application environment.
Returns the provider for model and the model name to send to it.
Types
Functions
@spec active() :: [module()]
Providers that can serve requests now.
@spec catalog() :: [map()]
Model catalog of all registered providers, with the provider id and availability.
Human-readable message for a resolution error.
@spec registered() :: [module()]
Providers registered in the application environment.
Returns the provider for model and the model name to send to it.