Immutable authority for one executable native model selection.
Persisted values decode into Stored, which deliberately has no ReqLLM model.
A selection becomes active only after its exact route has been validated and
materialized into one inline LLMDB.Model.
Summary
Functions
Constructs the only valid form of a newly active selection.
Returns a human-readable, secret-free credential identity.
Decodes and validates persisted data without making it executable.
Encodes an active selection without runtime modules, models, paths, or secrets.
Returns an opaque stable hash of the exact route and credential identity.
Composes image-input and tool-result transport support for the exact selection.
Returns true only when image input is explicitly supported.
Materializes a decoded stored selection against its declared Minga backend.
Returns true only when the exact route explicitly supports images in tool results.
Returns true only when tool use is explicitly supported.
Returns the persistence codec version.
Changes reasoning effort while preserving the immutable executable route.
Types
@type capability() :: MingaAgent.ModelSelection.Policy.capability()
@type credential_ref() :: MingaAgent.ModelSelection.Credential.ApiKey.t() | MingaAgent.ModelSelection.Credential.OAuth.t()
@type image_tool_result_delivery() ::
:supported | {:unsupported, :model_image_input | :tool_result_transport}
@type t() :: %MingaAgent.ModelSelection{ backend_id: String.t(), backend_module: module(), credential: credential_ref(), evidence: MingaAgent.ModelSelection.Evidence.t(), policy: MingaAgent.ModelSelection.Policy.t(), request_model: LLMDB.Model.t(), route: MingaAgent.ModelSelection.Route.t() }
Functions
@spec build( map(), MingaAgent.ModelSelection.Route.t(), credential_ref(), MingaAgent.ModelSelection.Policy.t(), MingaAgent.ModelSelection.Evidence.t() ) :: {:ok, t()} | {:error, term()}
Constructs the only valid form of a newly active selection.
@spec credential_id(credential_ref()) :: String.t()
Returns a human-readable, secret-free credential identity.
@spec decode(map()) :: {:ok, MingaAgent.ModelSelection.Stored.t()} | {:error, term()}
Decodes and validates persisted data without making it executable.
Encodes an active selection without runtime modules, models, paths, or secrets.
@spec id(t() | MingaAgent.ModelSelection.Stored.t()) :: String.t()
Returns an opaque stable hash of the exact route and credential identity.
@spec image_tool_result_delivery(t()) :: image_tool_result_delivery()
Composes image-input and tool-result transport support for the exact selection.
Returns true only when image input is explicitly supported.
@spec materialize(MingaAgent.ModelSelection.Stored.t(), map()) :: {:ok, t()} | {:error, term()}
Materializes a decoded stored selection against its declared Minga backend.
Returns true only when the exact route explicitly supports images in tool results.
Returns true only when tool use is explicitly supported.
@spec version() :: pos_integer()
Returns the persistence codec version.
Changes reasoning effort while preserving the immutable executable route.