@@ -247,6 +247,26 @@ public function loadExtension(array $config, ContainerConfigurator $container, C
247247 */
248248 private function processPlatformConfig (string $ type , array $ platform , ContainerBuilder $ container ): void
249249 {
250+ if ('albert ' === $ type ) {
251+ $ platformId = 'ai.platform.albert ' ;
252+ $ definition = (new Definition (Platform::class))
253+ ->setFactory (AlbertPlatformFactory::class.'::create ' )
254+ ->setLazy (true )
255+ ->addTag ('proxy ' , ['interface ' => PlatformInterface::class])
256+ ->setArguments ([
257+ $ platform ['api_key ' ],
258+ $ platform ['base_url ' ],
259+ new Reference ($ platform ['http_client ' ], ContainerInterface::NULL_ON_INVALID_REFERENCE ),
260+ new Reference ('ai.platform.model_catalog.albert ' ),
261+ new Reference ('event_dispatcher ' ),
262+ ])
263+ ->addTag ('ai.platform ' , ['name ' => 'albert ' ]);
264+
265+ $ container ->setDefinition ($ platformId , $ definition );
266+
267+ return ;
268+ }
269+
250270 if ('anthropic ' === $ type ) {
251271 $ platformId = 'ai.platform.anthropic ' ;
252272 $ definition = (new Definition (Platform::class))
@@ -396,25 +416,6 @@ private function processPlatformConfig(string $type, array $platform, ContainerB
396416 return ;
397417 }
398418
399- if ('albert ' === $ type ) {
400- $ platformId = 'ai.platform.albert ' ;
401- $ definition = (new Definition (Platform::class))
402- ->setFactory (AlbertPlatformFactory::class.'::create ' )
403- ->setLazy (true )
404- ->addTag ('proxy ' , ['interface ' => PlatformInterface::class])
405- ->setArguments ([
406- $ platform ['api_key ' ],
407- $ platform ['base_url ' ],
408- new Reference ($ platform ['http_client ' ], ContainerInterface::NULL_ON_INVALID_REFERENCE ),
409- new Reference ('event_dispatcher ' ),
410- ])
411- ->addTag ('ai.platform ' , ['name ' => 'albert ' ]);
412-
413- $ container ->setDefinition ($ platformId , $ definition );
414-
415- return ;
416- }
417-
418419 if ('openrouter ' === $ type ) {
419420 $ platformId = 'ai.platform.openrouter ' ;
420421 $ definition = (new Definition (Platform::class))
0 commit comments