ReqLLM.Compatibility.Evidence (ReqLLM v1.19.0)

View Source

Versioned compatibility evidence for models, execution surfaces, and scenarios.

Evidence is tooling metadata. It does not participate in model resolution or request routing.

Summary

Functions

Annotates recorded surfaces with current catalog operation declarations.

Encodes evidence as deterministic, recursively key-sorted JSON.

Classifies a failed execution into a stable compatibility layer.

Returns the default checked-in evidence path.

Returns the supported failure-layer names.

Resolves a stable execution-surface ID from recorded fixture request URLs.

Returns the default evidence freshness window in days.

Loads and migrates compatibility evidence from disk.

Loads compatibility evidence or raises.

Migrates legacy scenario state into the current evidence schema.

Returns evidence-derived statuses for every recorded surface of a model.

Records scenario results without discarding prior observations.

Reindexes recorded scenarios from their fixture-backed execution surfaces.

Returns the current evidence schema version.

Returns the evidence-derived status for one declared operation.

Writes evidence as deterministic, recursively key-sorted JSON.

Types

tier()

@type tier() :: :first_class | :best_effort | :experimental | :unsupported

Functions

annotate_declarations(evidence, resolver \\ &LLMDB.model/1)

@spec annotate_declarations(map(), (binary() ->
                                {:ok, LLMDB.Model.t()} | {:error, term()})) ::
  map()

Annotates recorded surfaces with current catalog operation declarations.

canonical_json(evidence)

@spec canonical_json(map()) :: binary()

Encodes evidence as deterministic, recursively key-sorted JSON.

classify_failure(error)

@spec classify_failure(binary() | nil) :: binary() | nil

Classifies a failed execution into a stable compatibility layer.

default_path()

@spec default_path() :: Path.t()

Returns the default checked-in evidence path.

failure_layers()

@spec failure_layers() :: [binary()]

Returns the supported failure-layer names.

fixture_surface(fixture_root, model_spec, operation, fixtures)

@spec fixture_surface(Path.t(), binary(), atom(), [binary()]) :: binary() | nil

Resolves a stable execution-surface ID from recorded fixture request URLs.

freshness_days()

@spec freshness_days() :: pos_integer()

Returns the default evidence freshness window in days.

load(path \\ default_path(), opts \\ [])

@spec load(
  Path.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Loads and migrates compatibility evidence from disk.

load!(path \\ default_path(), opts \\ [])

@spec load!(
  Path.t(),
  keyword()
) :: map()

Loads compatibility evidence or raises.

migrate(evidence, opts \\ [])

@spec migrate(
  map(),
  keyword()
) :: map()

Migrates legacy scenario state into the current evidence schema.

model_surface_statuses(evidence, model_spec, opts \\ [])

@spec model_surface_statuses(map(), binary(), keyword()) :: [map()]

Returns evidence-derived statuses for every recorded surface of a model.

record(evidence, results, checked_at, mode, opts \\ [])

@spec record(map(), [map()], DateTime.t(), binary(), keyword()) :: map()

Records scenario results without discarding prior observations.

resolve_surfaces(evidence, surface_resolver)

@spec resolve_surfaces(map(), (binary(), atom(), [binary()] -> binary() | nil)) ::
  map()

Reindexes recorded scenarios from their fixture-backed execution surfaces.

schema_version()

@spec schema_version() :: pos_integer()

Returns the current evidence schema version.

support_status(evidence, model_spec, operation, opts \\ [])

@spec support_status(map(), binary(), atom(), keyword()) :: map()

Returns the evidence-derived status for one declared operation.

write!(path, evidence)

@spec write!(Path.t(), map()) :: :ok

Writes evidence as deterministic, recursively key-sorted JSON.