Implement this behaviour to provide a model backend. The runtime calls
query/2 with a normalized request and expects a normalized response or an
error tuple with updated provider state.
LLM behaviour and contract validator.
Summary
Functions
Resolve the configured LLM from the process environment.
Types
@type request() :: map()
@type response() :: Cantrip.LLM.Response.t()
Callbacks
Functions
Resolve the configured LLM from the process environment.
ReqLLM is the only built-in provider adapter. CANTRIP_LLM_PROVIDER
selects the ReqLLM provider prefix and defaults to openai_compatible.
Provider-specific env vars override the generic CANTRIP_* values.
@spec validate_response(Cantrip.LLM.Response.t()) :: :ok | {:error, String.t()}