Wraps arbitrary callable LLMs with lightweight token/cost accounting.
Elixir values are immutable, so counters are kept in an Agent owned by the
wrapper. GEPA.StopCondition.MaxReflectionCost can read the live cost via
total_cost/1.
Summary
Types
@type counters() :: %{ total_cost: float(), total_tokens_in: non_neg_integer(), total_tokens_out: non_neg_integer(), calls: non_neg_integer() }
Functions
@spec calls(t()) :: non_neg_integer()
@spec complete(t(), GEPA.LLM.prompt(), keyword()) :: {:ok, String.t()} | {:error, term()}
@spec total_tokens_in(t()) :: non_neg_integer()
@spec total_tokens_out(t()) :: non_neg_integer()