diff --git a/lib/Service/OpenAiAPIService.php b/lib/Service/OpenAiAPIService.php index ac853808..f8ded2ad 100644 --- a/lib/Service/OpenAiAPIService.php +++ b/lib/Service/OpenAiAPIService.php @@ -842,7 +842,8 @@ private function buildChatCompletionRequestParams( $params['max_tokens'] = $maxTokens; } - if ($tools !== null) { + // IONOS does not like an empty tool array + if ($tools !== null && count($tools) > 0) { $params['tools'] = $tools; } if ($userId !== null && $this->isUsingOpenAi()) { diff --git a/psalm.xml b/psalm.xml index 0e06a050..c434ee52 100644 --- a/psalm.xml +++ b/psalm.xml @@ -8,6 +8,7 @@ errorLevel="4" findUnusedBaselineEntry="true" findUnusedCode="false" + findUnusedIssueHandlerSuppression="false" resolveFromConfigFile="true" ensureOverrideAttribute="false" phpVersion="8.3"