TypeSafeSDK.Models (TypeSafeSDK v0.4.0)

Copy Markdown View Source

Models API resource and pure catalog helpers.

Summary

Functions

Find one model by exact identifier; no fuzzy or prefix matching is performed.

Exact lookup that raises the SDK error on failure.

Select the objectively latest model by release_date.

Functions

find(models, identifier)

Find one model by exact identifier; no fuzzy or prefix matching is performed.

find!(models, identifier)

Exact lookup that raises the SDK error on failure.

latest(models, selector)

Select the objectively latest model by release_date.

selector may be :all, an exact model name, a keyword/map of exact model fields, or a unary predicate. Invalid/missing release dates and ties fail closed instead of falling back to lexical or provider-return order.

list(client, opts \\ [])

@spec list(TypeSafeSDK.Client.t(), keyword()) ::
  {:ok, TypeSafeSDK.ListModelsResponse.t()} | {:error, term()}