Title: 0.2.0 | Developer.WordPress.org

---

# New and updated in 0.2.0

Functions

Hooks

Classes

Methods

 * method[ProviderRegistry::getProviderId()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-providerregistry/getproviderid/)
 * Gets the provider ID for a registered provider.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-providerregistry/getproviderid/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-providerregistry/getproviderid/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/ProviderRegistry.php:163](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/ProviderRegistry.php#L163-L175)
 * method[ModelRequirements::fromPromptData()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-models-dto-modelrequirements/frompromptdata/)
 * Creates ModelRequirements from prompt data and model configuration.
 * Used by [2 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-models-dto-modelrequirements/frompromptdata/#used-by)
   | Uses [4 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-models-dto-modelrequirements/frompromptdata/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Models/DTO/ModelRequirements.php:133](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Models/DTO/ModelRequirements.php#L133-L185)
 * method[ModelRequirements::toRequiredOptions()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-models-dto-modelrequirements/torequiredoptions/)
 * Converts ModelConfig to an array of RequiredOptions.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-models-dto-modelrequirements/torequiredoptions/#used-by)
   | Uses [21 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-models-dto-modelrequirements/torequiredoptions/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Models/DTO/ModelRequirements.php:194](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Models/DTO/ModelRequirements.php#L194-L261)
 * method[ModelRequirements::includeInRequiredOptions()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-models-dto-modelrequirements/includeinrequiredoptions/)
 * Includes a RequiredOption in the array, ensuring no duplicates based on option
   name.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-models-dto-modelrequirements/includeinrequiredoptions/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-models-dto-modelrequirements/includeinrequiredoptions/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Models/DTO/ModelRequirements.php:271](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Models/DTO/ModelRequirements.php#L271-L284)
 * method[ModelRequirements::areMetBy()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-models-dto-modelrequirements/aremetby/)
 * Checks whether the given model metadata meets these requirements.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-models-dto-modelrequirements/aremetby/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-models-dto-modelrequirements/aremetby/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Models/DTO/ModelRequirements.php:92](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Models/DTO/ModelRequirements.php#L92-L122)
 * class[ErrorMessageExtractor](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-util-errormessageextractor/)
 * Utility for extracting error messages from API response data.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-util-errormessageextractor/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-util-errormessageextractor/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/Util/ErrorMessageExtractor.php:15](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/Util/ErrorMessageExtractor.php#L15-L53)
 * method[ErrorMessageExtractor::extractFromResponseData()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-util-errormessageextractor/extractfromresponsedata/)
 * Extracts error message from API response data.
 * Used by [2 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-util-errormessageextractor/extractfromresponsedata/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-util-errormessageextractor/extractfromresponsedata/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/Util/ErrorMessageExtractor.php:30](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/Util/ErrorMessageExtractor.php#L30-L52)
 * method[HttpTransporter::mergeOptions()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/mergeoptions/)
 * Merges request options with parameter options taking precedence.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/mergeoptions/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/mergeoptions/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php:95](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php#L95-L131)
 * method[HttpTransporter::isGuzzleClient()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/isguzzleclient/)
 * Determines if the underlying client matches the Guzzle client shape.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/isguzzleclient/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/isguzzleclient/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php:140](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php#L140-L170)
 * method[HttpTransporter::sendWithGuzzle()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/sendwithguzzle/)
 * Sends a request using a Guzzle-compatible client.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/sendwithguzzle/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/sendwithguzzle/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php:180](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php#L180-L188)
 * method[HttpTransporter::buildGuzzleOptions()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/buildguzzleoptions/)
 * Converts request options to a Guzzle-compatible options array.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/buildguzzleoptions/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/buildguzzleoptions/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php:197](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php#L197-L222)
 * method[ResponseException::fromInvalidData()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-responseexception/frominvaliddata/)
 * Creates a ResponseException from invalid data in an API response.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-responseexception/frominvaliddata/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-responseexception/frominvaliddata/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/Exception/ResponseException.php:42](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/Exception/ResponseException.php#L42-L45)
 * class[ServerException](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-serverexception/)
 * Exception thrown for 5xx HTTP server errors.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-serverexception/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-serverexception/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/Exception/ServerException.php:17](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/Exception/ServerException.php#L17-L46)
 * method[ServerException::fromServerErrorResponse()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-serverexception/fromservererrorresponse/)
 * Creates a ServerException from a server error response.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-serverexception/fromservererrorresponse/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-serverexception/fromservererrorresponse/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/Exception/ServerException.php:30](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/Exception/ServerException.php#L30-L45)
 * method[HttpTransporter::send()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/send/)
 * {@inheritDoc}
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/send/#used-by)
   | Uses [6 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/send/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php:64](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php#L64-L85)
 * method[ResponseException::fromMissingData()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-responseexception/frommissingdata/)
 * Creates a ResponseException for missing expected data.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-responseexception/frommissingdata/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-responseexception/frommissingdata/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/Exception/ResponseException.php:27](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/Exception/ResponseException.php#L27-L31)
 * method[ClientException::fromClientErrorResponse()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-clientexception/fromclienterrorresponse/)
 * Creates a ClientException from a client error response (4xx).
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-clientexception/fromclienterrorresponse/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-clientexception/fromclienterrorresponse/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/Exception/ClientException.php:52](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/Exception/ClientException.php#L52-L67)
 * class[NetworkException](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-networkexception/)
 * Exception thrown for network-related errors.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-networkexception/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-networkexception/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/Exception/NetworkException.php:17](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/Exception/NetworkException.php#L17-L57)
 * method[NetworkException::getRequest()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-networkexception/getrequest/)
 * Returns the request that failed as our Request DTO.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-networkexception/getrequest/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-networkexception/getrequest/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/Exception/NetworkException.php:33](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/Exception/NetworkException.php#L33-L39)
 * method[NetworkException::fromPsr18NetworkException()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-networkexception/frompsr18networkexception/)
 * Creates a NetworkException from a PSR-18 network exception.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-networkexception/frompsr18networkexception/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-networkexception/frompsr18networkexception/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/Exception/NetworkException.php:49](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/Exception/NetworkException.php#L49-L56)
 * class[RedirectException](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-redirectexception/)
 * Exception thrown for 3xx HTTP redirect responses.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-redirectexception/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-redirectexception/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/Exception/RedirectException.php:17](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/Exception/RedirectException.php#L17-L47)
 * method[RedirectException::fromRedirectResponse()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-redirectexception/fromredirectresponse/)
 * Creates a RedirectException from a redirect response.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-redirectexception/fromredirectresponse/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-redirectexception/fromredirectresponse/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/Exception/RedirectException.php:30](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/Exception/RedirectException.php#L30-L46)
 * class[ClientException](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-clientexception/)
 * Exception thrown for 4xx HTTP client errors.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-clientexception/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-clientexception/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/Exception/ClientException.php:18](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/Exception/ClientException.php#L18-L68)
 * method[ClientException::getRequest()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-clientexception/getrequest/)
 * Returns the request that failed as our Request DTO.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-clientexception/getrequest/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-exception-clientexception/getrequest/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/Exception/ClientException.php:34](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/Exception/ClientException.php#L34-L40)
 * method[RequestOptions::validateTimeout()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-dto-requestoptions/validatetimeout/)
 * Validates timeout values.
 * Used by [2 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-dto-requestoptions/validatetimeout/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-dto-requestoptions/validatetimeout/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/DTO/RequestOptions.php:198](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/DTO/RequestOptions.php#L198-L203)
 * method[RequestOptions::allowsRedirects()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-dto-requestoptions/allowsredirects/)
 * Checks whether redirects are allowed.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-dto-requestoptions/allowsredirects/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-dto-requestoptions/allowsredirects/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/DTO/RequestOptions.php:121](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/DTO/RequestOptions.php#L121-L127)
 * method[RequestOptions::getMaxRedirects()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-dto-requestoptions/getmaxredirects/)
 * Gets the maximum number of redirects to follow.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-dto-requestoptions/getmaxredirects/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-dto-requestoptions/getmaxredirects/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/DTO/RequestOptions.php:135](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/DTO/RequestOptions.php#L135-L138)
 * method[RequestOptions::toArray()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-dto-requestoptions/toarray/)
 * {@inheritDoc}
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-dto-requestoptions/toarray/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-dto-requestoptions/toarray/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/DTO/RequestOptions.php:146](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/DTO/RequestOptions.php#L146-L159)
 * method[RequestOptions::fromArray()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-dto-requestoptions/fromarray/)
 * {@inheritDoc}
 * Used by [2 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-dto-requestoptions/fromarray/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-dto-requestoptions/fromarray/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/DTO/RequestOptions.php:165](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/DTO/RequestOptions.php#L165-L178)
 * method[RequestOptions::getJsonSchema()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-dto-requestoptions/getjsonschema/)
 * {@inheritDoc}
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-dto-requestoptions/getjsonschema/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-dto-requestoptions/getjsonschema/#uses)
   | Source: [wp-includes/php-ai-client/src/Providers/Http/DTO/RequestOptions.php:184](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/DTO/RequestOptions.php#L184-L187)

1 [2](https://developer.wordpress.org/reference/since/0.2.0/page/2/?output_format=md)
[3](https://developer.wordpress.org/reference/since/0.2.0/page/3/?output_format=md)

 [Next Page](https://developer.wordpress.org/reference/since/0.2.0/page/2/?output_format=md)