CliSubprocessCore.ModelInput (CliSubprocessCore v0.1.0)

Copy Markdown View Source

Normalizes mixed model input into one authoritative model payload.

Callers may supply either raw model resolution knobs or a pre-resolved CliSubprocessCore.ModelRegistry.Selection. This module centralizes the arbitration and consistency rules so downstream layers can consume one canonical payload instead of re-resolving model policy locally.

Summary

Types

attrs()

@type attrs() :: keyword() | map()

t()

@type t() :: %CliSubprocessCore.ModelInput{
  attrs: attrs(),
  provider: atom(),
  selection: CliSubprocessCore.ModelRegistry.Selection.t()
}

Functions

normalize(provider, attrs)

@spec normalize(atom(), attrs()) :: {:ok, t()} | {:error, term()}

Normalizes model input for provider.

Returns the authoritative Selection and normalized attrs/options with :model_payload attached and raw model-resolution keys removed.

normalize(provider, attrs, opts)

@spec normalize(atom(), attrs(), keyword()) :: {:ok, t()} | {:error, term()}