ReqLLM.Providers (ReqLLM v1.14.0)

View Source

Provider discovery and dispatch via introspection.

Automatically discovers all modules implementing ReqLLM.Provider behaviour at startup and stores provider_id → module mapping.

External packages can register custom providers via register/1:

defmodule MyApp.Application do
  def start(_type, _args) do
    ReqLLM.Providers.register(MyApp.CustomProvider)
    # ...
  end
end

Summary

Functions

get(provider_id)

get!(provider_id)

get_env_key(provider_id)

initialize()

list()

register(module)

register!(module)

unregister(provider_id)