The models endpoint: GET /v1/models.
The path is not documented on the public API reference; it comes from the
official Python SDK's constants (MODELS_PATH = "/v1/models"), and the
response shape {"models": [{"name", "description", "release_date"}]} from
its generated schema.
Because the endpoint is undocumented, list/2 is deliberately tolerant: an
entry it cannot decode is logged at warning and skipped, and the models that
did decode are returned. A list endpoint is the one place where one unfamiliar
row should not cost you the other ten. Only a body with no models array at
all is an error.
Summary
Functions
@spec list(TypeSafeAPI.Client.t(), keyword()) :: {:ok, [TypeSafeAPI.Model.t()]} | {:error, TypeSafeAPI.Error.t()}
Lists the models available to the account.
An unknown option is a :validation error and no request is sent, the same
as for TypeSafeAPI.evaluate/4. An entry that fails to decode is logged and
skipped; see the module doc.
Options
:timeout(pos_integer/0) - Timeout in milliseconds for this call.:retry- Retry policy for this call; seeTypeSafeAPI.Retry.new/1.:telemetry(map/0) - Extra metadata merged into telemetry events.
@spec options_schema() :: NimbleOptions.t()
Per-call options accepted by list/2.
:timeout(pos_integer/0) - Timeout in milliseconds for this call.:retry- Retry policy for this call; seeTypeSafeAPI.Retry.new/1.:telemetry(map/0) - Extra metadata merged into telemetry events.
@spec path() :: String.t()
The models endpoint path.