ModelCollectionResponse
Represents a page of loaded models.
For the list of response object types, see Response Objects.
Use ModelCollectionResponse to read model list results and pagination metadata returned by model listing operations.
Attributes
| Attribute | Type | Description |
|---|---|---|
items |
list of ModelItemWithLinks or None |
Models returned in the current page. |
has_more |
bool or None |
Indicates whether another page of models is available. |
limit |
int or float or None |
Page size limit applied by the service. |
offset |
int or float or None |
Offset used for the current page. |
count |
int or float or None |
Number of models returned in the current page. |
links |
list[LinkRelation] or None |
Hypermedia links returned by the service. |
ModelItemWithLinks
Represents one model returned in the items list of a ModelCollectionResponse response.
Attributes
| Attribute | Type | Description |
|---|---|---|
model_name |
str or None |
Name of the model. |
algorithm |
str or None |
Algorithm used by the model. |
mining_function |
str or None |
Mining function supported by the model. |
creation_date |
str or None |
Model creation date. |
attributes |
list[ModelAttributeItem] or None |
Model attributes returned by the service. |
links |
list[LinkRelation] or None |
Hypermedia links returned by the service. |
Iterate Items
Iterate over response.items to access each model item and its attributes.
response = client.list_models()
for model in response.items or []:
print(model.model_name)
print(model.mining_function)
Methods
| Method | Return Type | Description |
|---|---|---|
model_dump() |
dict[str, Any] |
Returns a dictionary representation of the response. |
model_dump_json() |
str |
Returns a JSON string representation of the response. |
to_dict() |
dict[str, Any] |
Returns a dictionary representation compatible with earlier SDK response handling. |
to_json() |
str |
Returns a JSON string representation compatible with earlier SDK response handling. |
to_str() |
str |
Returns a readable string representation compatible with earlier SDK response handling. |
model_validate(obj) |
ModelCollectionResponse |
Creates a response object from a dictionary payload. |
model_validate_json(json_data) |
ModelCollectionResponse |
Creates a response object from a JSON string. |
Iterate Attributes
Use serialization helpers to iterate response attributes and item attributes.
response = client.list_models()
payload = response.to_dict()
for attribute, value in payload.items():
print(attribute, value)
for item in response.items or []:
item_payload = item.to_dict()
for attribute, value in item_payload.items():
print(attribute, value)
Sample Response
{
"items": [
{
"model_name": "ALL_MINILM_L12_V2",
"algorithm": "ONNX",
"mining_function": "EMBEDDING",
"creation_date": "2026-01-27T07:23:21Z"
}
],
"hasMore": false,
"limit": 25,
"offset": 0,
"count": 1
}
Returned By
Returned by: list_models().