From 67cb6fb8a21f513f6b319311d9fb84d4311a0ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 26 Apr 2026 01:27:25 +0200 Subject: [PATCH] AcceptAllModels return CompletitionsModels as fallback --- src/Services/AI/AcceptAllModelsCatalog.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Services/AI/AcceptAllModelsCatalog.php b/src/Services/AI/AcceptAllModelsCatalog.php index b3b68135..bf590128 100644 --- a/src/Services/AI/AcceptAllModelsCatalog.php +++ b/src/Services/AI/AcceptAllModelsCatalog.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace App\Services\AI; +use Symfony\AI\Platform\Bridge\Generic\CompletionsModel; use Symfony\AI\Platform\Exception\ModelNotFoundException; use Symfony\AI\Platform\Model; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; @@ -47,7 +48,7 @@ final readonly class AcceptAllModelsCatalog implements ModelCatalogInterface return $this->decorated->getModel($modelName); } catch (ModelNotFoundException $e) { //If the model is not found, return a generic model with the given name and no capabilities. - return new Model($modelName, []); + return new CompletionsModel($modelName, []); } }