@@ -3901,7 +3901,7 @@ public function testToolboxWithoutExplicitToolsDefined()
39013901 $ this ->assertTrue ($ foundOutput , 'Default tool processor should have output tag with full agent ID ' );
39023902 }
39033903
3904- public function testElevenLabsPlatformCanBeRegistered ()
3904+ public function testElevenLabsPlatformCanBeConfigured ()
39053905 {
39063906 $ container = $ this ->buildContainer ([
39073907 'ai ' => [
@@ -3916,18 +3916,18 @@ public function testElevenLabsPlatformCanBeRegistered()
39163916 $ this ->assertTrue ($ container ->hasDefinition ('ai.platform.elevenlabs ' ));
39173917
39183918 $ definition = $ container ->getDefinition ('ai.platform.elevenlabs ' );
3919-
39203919 $ this ->assertTrue ($ definition ->isLazy ());
39213920 $ this ->assertSame ([ElevenLabsPlatformFactory::class, 'create ' ], $ definition ->getFactory ());
39223921
39233922 $ this ->assertCount (6 , $ definition ->getArguments ());
39243923 $ this ->assertSame ('foo ' , $ definition ->getArgument (0 ));
3925- $ this ->assertSame ('https://api.elevenlabs.io/v1 ' , $ definition ->getArgument (1 ));
3924+ $ this ->assertSame ('https://api.elevenlabs.io/v1/ ' , $ definition ->getArgument (1 ));
39263925 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (2 ));
3927- $ this ->assertSame ('http_client ' , (string ) $ definition ->getArgument (2 ));
3926+ $ this ->assertSame ('ai.platform.elevenlabs.scoped_http_client ' , (string ) $ definition ->getArgument (2 ));
39283927 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (3 ));
39293928 $ this ->assertSame ('ai.platform.model_catalog.elevenlabs ' , (string ) $ definition ->getArgument (3 ));
3930- $ this ->assertNull ($ definition ->getArgument (4 ));
3929+ $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (4 ));
3930+ $ this ->assertSame ('ai.platform.contract.elevenlabs ' , (string ) $ definition ->getArgument (4 ));
39313931 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (5 ));
39323932 $ this ->assertSame ('event_dispatcher ' , (string ) $ definition ->getArgument (5 ));
39333933
@@ -3946,16 +3946,13 @@ public function testElevenLabsPlatformCanBeRegistered()
39463946
39473947 $ this ->assertTrue ($ modelCatalogDefinition ->hasTag ('proxy ' ));
39483948 $ this ->assertSame ([['interface ' => ModelCatalogInterface::class]], $ modelCatalogDefinition ->getTag ('proxy ' ));
3949- }
39503949
3951- public function testElevenLabsPlatformWithCustomEndpointCanBeRegistered ()
3952- {
39533950 $ container = $ this ->buildContainer ([
39543951 'ai ' => [
39553952 'platform ' => [
39563953 'elevenlabs ' => [
3954+ 'endpoint ' => 'https://api.elevenlabs.io/v2 ' ,
39573955 'api_key ' => 'foo ' ,
3958- 'host ' => 'https://api.elevenlabs.io/v2 ' ,
39593956 ],
39603957 ],
39613958 ],
@@ -3964,18 +3961,18 @@ public function testElevenLabsPlatformWithCustomEndpointCanBeRegistered()
39643961 $ this ->assertTrue ($ container ->hasDefinition ('ai.platform.elevenlabs ' ));
39653962
39663963 $ definition = $ container ->getDefinition ('ai.platform.elevenlabs ' );
3967-
39683964 $ this ->assertTrue ($ definition ->isLazy ());
39693965 $ this ->assertSame ([ElevenLabsPlatformFactory::class, 'create ' ], $ definition ->getFactory ());
39703966
39713967 $ this ->assertCount (6 , $ definition ->getArguments ());
39723968 $ this ->assertSame ('foo ' , $ definition ->getArgument (0 ));
39733969 $ this ->assertSame ('https://api.elevenlabs.io/v2 ' , $ definition ->getArgument (1 ));
39743970 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (2 ));
3975- $ this ->assertSame ('http_client ' , (string ) $ definition ->getArgument (2 ));
3971+ $ this ->assertSame ('ai.platform.elevenlabs.scoped_http_client ' , (string ) $ definition ->getArgument (2 ));
39763972 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (3 ));
39773973 $ this ->assertSame ('ai.platform.model_catalog.elevenlabs ' , (string ) $ definition ->getArgument (3 ));
3978- $ this ->assertNull ($ definition ->getArgument (4 ));
3974+ $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (4 ));
3975+ $ this ->assertSame ('ai.platform.contract.elevenlabs ' , (string ) $ definition ->getArgument (4 ));
39793976 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (5 ));
39803977 $ this ->assertSame ('event_dispatcher ' , (string ) $ definition ->getArgument (5 ));
39813978
@@ -3994,10 +3991,7 @@ public function testElevenLabsPlatformWithCustomEndpointCanBeRegistered()
39943991
39953992 $ this ->assertTrue ($ modelCatalogDefinition ->hasTag ('proxy ' ));
39963993 $ this ->assertSame ([['interface ' => ModelCatalogInterface::class]], $ modelCatalogDefinition ->getTag ('proxy ' ));
3997- }
39983994
3999- public function testElevenLabsPlatformWithCustomHttpClientCanBeRegistered ()
4000- {
40013995 $ container = $ this ->buildContainer ([
40023996 'ai ' => [
40033997 'platform ' => [
@@ -4018,12 +4012,13 @@ public function testElevenLabsPlatformWithCustomHttpClientCanBeRegistered()
40184012
40194013 $ this ->assertCount (6 , $ definition ->getArguments ());
40204014 $ this ->assertSame ('foo ' , $ definition ->getArgument (0 ));
4021- $ this ->assertSame ('https://api.elevenlabs.io/v1 ' , $ definition ->getArgument (1 ));
4015+ $ this ->assertSame ('https://api.elevenlabs.io/v1/ ' , $ definition ->getArgument (1 ));
40224016 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (2 ));
4023- $ this ->assertSame ('foo ' , (string ) $ definition ->getArgument (2 ));
4017+ $ this ->assertSame ('ai.platform.elevenlabs.scoped_http_client ' , (string ) $ definition ->getArgument (2 ));
40244018 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (3 ));
40254019 $ this ->assertSame ('ai.platform.model_catalog.elevenlabs ' , (string ) $ definition ->getArgument (3 ));
4026- $ this ->assertNull ($ definition ->getArgument (4 ));
4020+ $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (4 ));
4021+ $ this ->assertSame ('ai.platform.contract.elevenlabs ' , (string ) $ definition ->getArgument (4 ));
40274022 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (5 ));
40284023 $ this ->assertSame ('event_dispatcher ' , (string ) $ definition ->getArgument (5 ));
40294024
@@ -4042,10 +4037,7 @@ public function testElevenLabsPlatformWithCustomHttpClientCanBeRegistered()
40424037
40434038 $ this ->assertTrue ($ modelCatalogDefinition ->hasTag ('proxy ' ));
40444039 $ this ->assertSame ([['interface ' => ModelCatalogInterface::class]], $ modelCatalogDefinition ->getTag ('proxy ' ));
4045- }
40464040
4047- public function testElevenLabsPlatformWithApiCatalogCanBeRegistered ()
4048- {
40494041 $ container = $ this ->buildContainer ([
40504042 'ai ' => [
40514043 'platform ' => [
@@ -4067,12 +4059,13 @@ public function testElevenLabsPlatformWithApiCatalogCanBeRegistered()
40674059
40684060 $ this ->assertCount (6 , $ definition ->getArguments ());
40694061 $ this ->assertSame ('foo ' , $ definition ->getArgument (0 ));
4070- $ this ->assertSame ('https://api.elevenlabs.io/v1 ' , $ definition ->getArgument (1 ));
4062+ $ this ->assertSame ('https://api.elevenlabs.io/v1/ ' , $ definition ->getArgument (1 ));
40714063 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (2 ));
4072- $ this ->assertSame ('http_client ' , (string ) $ definition ->getArgument (2 ));
4064+ $ this ->assertSame ('ai.platform.elevenlabs.scoped_http_client ' , (string ) $ definition ->getArgument (2 ));
40734065 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (3 ));
40744066 $ this ->assertSame ('ai.platform.model_catalog.elevenlabs ' , (string ) $ definition ->getArgument (3 ));
4075- $ this ->assertNull ($ definition ->getArgument (4 ));
4067+ $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (4 ));
4068+ $ this ->assertSame ('ai.platform.contract.elevenlabs ' , (string ) $ definition ->getArgument (4 ));
40764069 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (5 ));
40774070 $ this ->assertSame ('event_dispatcher ' , (string ) $ definition ->getArgument (5 ));
40784071
@@ -4088,11 +4081,9 @@ public function testElevenLabsPlatformWithApiCatalogCanBeRegistered()
40884081
40894082 $ this ->assertSame (ElevenLabsApiCatalog::class, $ modelCatalogDefinition ->getClass ());
40904083 $ this ->assertTrue ($ modelCatalogDefinition ->isLazy ());
4091- $ this ->assertCount (3 , $ modelCatalogDefinition ->getArguments ());
4084+ $ this ->assertCount (1 , $ modelCatalogDefinition ->getArguments ());
40924085 $ this ->assertInstanceOf (Reference::class, $ modelCatalogDefinition ->getArgument (0 ));
4093- $ this ->assertSame ('http_client ' , (string ) $ modelCatalogDefinition ->getArgument (0 ));
4094- $ this ->assertSame ('foo ' , $ modelCatalogDefinition ->getArgument (1 ));
4095- $ this ->assertSame ('https://api.elevenlabs.io/v1 ' , $ modelCatalogDefinition ->getArgument (2 ));
4086+ $ this ->assertSame ('ai.platform.elevenlabs.scoped_http_client ' , (string ) $ modelCatalogDefinition ->getArgument (0 ));
40964087
40974088 $ this ->assertTrue ($ modelCatalogDefinition ->hasTag ('proxy ' ));
40984089 $ this ->assertSame ([['interface ' => ModelCatalogInterface::class]], $ modelCatalogDefinition ->getTag ('proxy ' ));
@@ -7610,7 +7601,7 @@ private function getFullConfig(): array
76107601 'api_key ' => 'foo ' ,
76117602 ],
76127603 'elevenlabs ' => [
7613- 'host ' => 'https://api.elevenlabs.io/v1 ' ,
7604+ 'endpoint ' => 'https://api.elevenlabs.io/v1 ' ,
76147605 'api_key ' => 'elevenlabs_key_full ' ,
76157606 ],
76167607 'failover ' => [
0 commit comments