Fixed structured output response format

This commit is contained in:
Jan Böhmer 2026-04-26 00:40:17 +02:00
parent 2631ff4bee
commit c9d2044949

View file

@ -176,8 +176,10 @@ final class AIInfoExtractor implements InfoProviderInterface
//'openai/gpt-5-mini'
$result = $aiPlatform->invoke('openrouter/auto', $input, [
'response_format' => 'json_schema',
'json_schema' => $this->jsonSchemaConverter->getJSONSchema(),
'response_format' => [
'type' => 'json_schema',
'json_schema' => $this->jsonSchemaConverter->getJSONSchema(),
]
]);
} catch (\Throwable $e) {
throw new \RuntimeException('LLM invocation failed: '.$e->getMessage(), previous: $e);