Contract for a contributed model route that supplies model streams to Minga's native agent loop.
A route produces model output only. Minga runs every tool, approval, retry, compaction, and history step. A route never executes a tool. The contract uses only Minga-owned values, so it stays stable when Minga changes its internal model library.
This is a compile-time stub. At runtime, the real behaviour in Minga's BEAM VM is used.
Summary
Types
@type error_kind() ::
:auth_failed
| :rate_limited
| :unreachable
| :invalid_model
| :context_transition_required
| :request_admission_refused
| :provider_error
| :tool_error
| :internal_error
| :unknown
@type route_credential() :: MingaAgent.InferenceRoute.Credential.t() | nil
Callbacks
@callback availability(route_id :: String.t(), credential :: route_credential()) :: availability()
@callback classify_error(term()) :: {error_kind(), message :: String.t()}
@callback models(config :: keyword()) :: [MingaAgent.InferenceRoute.Model.t()]
@callback stream(MingaAgent.InferenceRoute.Request.t()) :: {:ok, MingaAgent.InferenceRoute.Response.t()} | {:error, term()}