Conformance helpers for adapter tests.
Summary
Functions
Asserts an adapter reports well-formed capabilities before dispatch.
Asserts an adapter honors the closed response-format union.
Functions
@spec assert_capability_contract( module(), keyword() ) :: [Inference.Capability.t()]
Asserts an adapter reports well-formed capabilities before dispatch.
:require names capabilities the adapter must report at all; a registry can
then read the claim instead of dispatching to find out.
@spec assert_provider_error({:error, Inference.Error.t()}) :: Inference.Error.t()
Asserts an adapter honors the closed response-format union.
For every format the adapter must either return a response (it mapped the
format onto a real provider option) or refuse with a typed
:response_format_unsupported 2-tuple. Silently dropping a declared format —
the historical bug — is a conformance failure.
@spec assert_text_completion( module(), keyword() ) :: Inference.Response.t()
@spec assert_trace_metadata(Inference.Response.t()) :: map()
@spec assert_unsupported_stream( module(), keyword() ) :: Inference.Error.t()