Skip to content

Commit f50e46f

Browse files
committed
Fix API request options not being passed in Generative_AI_Service::list_models() implementations.
1 parent 40c4351 commit f50e46f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

includes/Anthropic/Anthropic_AI_Service.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function is_connected(): bool {
109109
* @throws Generative_AI_Exception Thrown if the request fails or the response is invalid.
110110
*/
111111
public function list_models( array $request_options = array() ): array {
112-
$request = $this->api->create_list_models_request();
112+
$request = $this->api->create_list_models_request( array(), $request_options );
113113
$response_data = $this->api->make_request( $request )->get_data();
114114

115115
if ( ! isset( $response_data['data'] ) || ! $response_data['data'] ) {

includes/Google/Google_AI_Service.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function is_connected(): bool {
107107
* @throws Generative_AI_Exception Thrown if the request fails or the response is invalid.
108108
*/
109109
public function list_models( array $request_options = array() ): array {
110-
$request = $this->api->create_list_models_request();
110+
$request = $this->api->create_list_models_request( array(), $request_options );
111111
$response_data = $this->api->make_request( $request )->get_data();
112112

113113
if ( ! isset( $response_data['models'] ) || ! $response_data['models'] ) {

includes/OpenAI/OpenAI_AI_Service.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function is_connected(): bool {
106106
* @throws Generative_AI_Exception Thrown if the request fails or the response is invalid.
107107
*/
108108
public function list_models( array $request_options = array() ): array {
109-
$request = $this->api->create_list_models_request();
109+
$request = $this->api->create_list_models_request( array(), $request_options );
110110
$response_data = $this->api->make_request( $request )->get_data();
111111

112112
if ( ! isset( $response_data['data'] ) || ! $response_data['data'] ) {

0 commit comments

Comments
 (0)