Skip to content

Commit 7c131b2

Browse files
franzwildingOskarStark
authored andcommitted
Fix contract injection issue
1 parent 5242431 commit 7c131b2

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

src/ai-bundle/config/services.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@
6969
return static function (ContainerConfigurator $container): void {
7070
$container->services()
7171
// contract
72-
->set('ai.platform.contract.default', Contract::class)
73-
->factory([Contract::class, 'create'])
7472
->set('ai.platform.contract.openai', Contract::class)
7573
->factory([OpenAiContract::class, 'create'])
7674
->set('ai.platform.contract.anthropic', Contract::class)

src/ai-bundle/src/AiBundle.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ private function processPlatformConfig(string $type, array $platform, ContainerB
297297
$platform['host'],
298298
new Reference($platform['http_client'], ContainerInterface::NULL_ON_INVALID_REFERENCE),
299299
new Reference('ai.platform.model_catalog.elevenlabs'),
300-
new Reference('ai.platform.contract.default'),
301300
])
302301
->addTag('ai.platform', ['name' => 'eleven_labs']);
303302

@@ -395,7 +394,6 @@ private function processPlatformConfig(string $type, array $platform, ContainerB
395394
$platform['api_key'],
396395
new Reference($platform['http_client'], ContainerInterface::NULL_ON_INVALID_REFERENCE),
397396
new Reference('ai.platform.model_catalog.openrouter'),
398-
new Reference('ai.platform.contract.default'),
399397
])
400398
->addTag('ai.platform', ['name' => 'openrouter']);
401399

@@ -414,7 +412,6 @@ private function processPlatformConfig(string $type, array $platform, ContainerB
414412
$platform['api_key'],
415413
new Reference($platform['http_client'], ContainerInterface::NULL_ON_INVALID_REFERENCE),
416414
new Reference('ai.platform.model_catalog.mistral'),
417-
new Reference('ai.platform.contract.default'),
418415
])
419416
->addTag('ai.platform', ['name' => 'mistral']);
420417

@@ -433,7 +430,6 @@ private function processPlatformConfig(string $type, array $platform, ContainerB
433430
$platform['host_url'],
434431
new Reference($platform['http_client'], ContainerInterface::NULL_ON_INVALID_REFERENCE),
435432
new Reference('ai.platform.model_catalog.lmstudio'),
436-
new Reference('ai.platform.contract.default'),
437433
])
438434
->addTag('ai.platform', ['name' => 'lmstudio']);
439435

@@ -471,7 +467,6 @@ private function processPlatformConfig(string $type, array $platform, ContainerB
471467
$platform['api_key'],
472468
new Reference($platform['http_client'], ContainerInterface::NULL_ON_INVALID_REFERENCE),
473469
new Reference('ai.platform.model_catalog.cerebras'),
474-
new Reference('ai.platform.contract.default'),
475470
])
476471
->addTag('ai.platform', ['name' => 'cerebras']);
477472

@@ -490,7 +485,6 @@ private function processPlatformConfig(string $type, array $platform, ContainerB
490485
$platform['api_key'],
491486
new Reference($platform['http_client'], ContainerInterface::NULL_ON_INVALID_REFERENCE),
492487
new Reference('ai.platform.model_catalog.deepseek'),
493-
new Reference('ai.platform.contract.default'),
494488
])
495489
->addTag('ai.platform', ['name' => 'deepseek']);
496490

@@ -509,7 +503,6 @@ private function processPlatformConfig(string $type, array $platform, ContainerB
509503
$platform['api_key'],
510504
new Reference($platform['http_client'], ContainerInterface::NULL_ON_INVALID_REFERENCE),
511505
new Reference('ai.platform.model_catalog.voyage'),
512-
new Reference('ai.platform.contract.default'),
513506
])
514507
->addTag('ai.platform', ['name' => 'voyage']);
515508

@@ -547,7 +540,6 @@ private function processPlatformConfig(string $type, array $platform, ContainerB
547540
$platform['host_url'],
548541
new Reference($platform['http_client'], ContainerInterface::NULL_ON_INVALID_REFERENCE),
549542
new Reference('ai.platform.model_catalog.dockermodelrunner'),
550-
new Reference('ai.platform.contract.default'),
551543
])
552544
->addTag('ai.platform');
553545

@@ -566,7 +558,6 @@ private function processPlatformConfig(string $type, array $platform, ContainerB
566558
$platform['api_key'],
567559
new Reference('http_client', ContainerInterface::NULL_ON_INVALID_REFERENCE),
568560
new Reference('ai.platform.model_catalog.scaleway'),
569-
new Reference('ai.platform.contract.default'),
570561
])
571562
->addTag('ai.platform');
572563

0 commit comments

Comments
 (0)