wp-includes/php-ai-client/src/Providers/Models/DTO/ModelMetadata.php:28Represents metadata about an AI model.
$idstringprotected$namestringprotected$supportedCapabilitiesWordPress\AiClient\Providers\Models\DTO\list<CapabilityEnum>protected$supportedOptionsWordPress\AiClient\Providers\Models\DTO\list<SupportedOption>protectedclass ModelMetadata extends AbstractDataTransferObject{ public const KEY_ID = 'id'; public const KEY_NAME = 'name'; public const KEY_SUPPORTED_CAPABILITIES = 'supportedCapabilities'; public const KEY_SUPPORTED_OPTIONS = 'supportedOptions'; /** * @var string The model's unique identifier. */ protected string $id; /** * @var string The model's display name. */ protected string $name; /** * @var list<CapabilityEnum> The model's supported capabilities. */ protected array $supportedCapabilities; /** * @var list<SupportedOption> The model's supported configuration options. */ protected array $supportedOptions; /** * Constructor. * * @since 0.1.0 * * @param string $id The model's unique identifier. * @param string $name The model's display name. * @param list<CapabilityEnum> $supportedCapabilities The model's supported capabilities. * @param list<SupportedOption> $supportedOptions The model's supported configuration options. * * @throws InvalidArgumentException If arrays are not lists. */ public function __construct(string $id, string $name, array $supportedCapabilities, array $supportedOptions) { if (!array_is_list($supportedCapabilities)) { throw new InvalidArgumentException('Supported capabilities must be a list array.'); } if (!array_is_list($supportedOptions)) { throw new InvalidArgumentException('Supported options must be a list array.'); } $this->id = $id; $this->name = $name; $this->supportedCapabilities = $supportedCapabilities; $this->supportedOptions = $supportedOptions; } /** * Gets the model's unique identifier. * * @since 0.1.0 * * @return string The model ID. */ public function getId(): string { return $this->id; } /** * Gets the model's display name. * * @since 0.1.0 * * @return string The model name. */ public function getName(): string { return $this->name; } /** * Gets the model's supported capabilities. * * @since 0.1.0 * * @return list<CapabilityEnum> The supported capabilities. */ public function getSupportedCapabilities(): array { return $this->supportedCapabilities; }Introduced in 0.1.0. Unchanged from 7.0.4 through 7.1.0.
Signature, return type and hooks compared across 2 parsed releases.
src/wp-includes/php-ai-client/src/Providers/Models/DTO/ModelMetadata.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.