update_from_list_model


Description:

public void update_from_list_model (Model source)

Updates this model's properties from another model.

Updates fields based on what's available in the source: - From show API: modified_at, capabilities, context_length, parameters, model - From list API: size, digest, modified_at (if not already set from show API), name

This method handles both show API responses (with capabilities/parameters/model) and list API responses (with size/digest/name). It intelligently merges data, preserving show API data when present and falling back to list API data when needed.

Parameters:

source

The model to copy properties from (can be from show API or list API)