@@ -3895,7 +3895,7 @@ public function testToolboxWithoutExplicitToolsDefined()
38953895 $ this ->assertTrue ($ foundOutput , 'Default tool processor should have output tag with full agent ID ' );
38963896 }
38973897
3898- public function testElevenLabsPlatformCanBeRegistered ()
3898+ public function testElevenLabsPlatformCanBeConfigured ()
38993899 {
39003900 $ container = $ this ->buildContainer ([
39013901 'ai ' => [
@@ -3910,18 +3910,18 @@ public function testElevenLabsPlatformCanBeRegistered()
39103910 $ this ->assertTrue ($ container ->hasDefinition ('ai.platform.elevenlabs ' ));
39113911
39123912 $ definition = $ container ->getDefinition ('ai.platform.elevenlabs ' );
3913-
39143913 $ this ->assertTrue ($ definition ->isLazy ());
39153914 $ this ->assertSame ([ElevenLabsPlatformFactory::class, 'create ' ], $ definition ->getFactory ());
39163915
39173916 $ this ->assertCount (6 , $ definition ->getArguments ());
39183917 $ this ->assertSame ('foo ' , $ definition ->getArgument (0 ));
3919- $ this ->assertSame ('https://api.elevenlabs.io/v1 ' , $ definition ->getArgument (1 ));
3918+ $ this ->assertSame ('https://api.elevenlabs.io/v1/ ' , $ definition ->getArgument (1 ));
39203919 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (2 ));
3921- $ this ->assertSame ('http_client ' , (string ) $ definition ->getArgument (2 ));
3920+ $ this ->assertSame ('ai.platform.elevenlabs.scoped_http_client ' , (string ) $ definition ->getArgument (2 ));
39223921 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (3 ));
39233922 $ this ->assertSame ('ai.platform.model_catalog.elevenlabs ' , (string ) $ definition ->getArgument (3 ));
3924- $ this ->assertNull ($ definition ->getArgument (4 ));
3923+ $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (4 ));
3924+ $ this ->assertSame ('ai.platform.contract.elevenlabs ' , (string ) $ definition ->getArgument (4 ));
39253925 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (5 ));
39263926 $ this ->assertSame ('event_dispatcher ' , (string ) $ definition ->getArgument (5 ));
39273927
@@ -3940,16 +3940,13 @@ public function testElevenLabsPlatformCanBeRegistered()
39403940
39413941 $ this ->assertTrue ($ modelCatalogDefinition ->hasTag ('proxy ' ));
39423942 $ this ->assertSame ([['interface ' => ModelCatalogInterface::class]], $ modelCatalogDefinition ->getTag ('proxy ' ));
3943- }
39443943
3945- public function testElevenLabsPlatformWithCustomEndpointCanBeRegistered ()
3946- {
39473944 $ container = $ this ->buildContainer ([
39483945 'ai ' => [
39493946 'platform ' => [
39503947 'elevenlabs ' => [
3948+ 'endpoint ' => 'https://api.elevenlabs.io/v2 ' ,
39513949 'api_key ' => 'foo ' ,
3952- 'host ' => 'https://api.elevenlabs.io/v2 ' ,
39533950 ],
39543951 ],
39553952 ],
@@ -3958,18 +3955,18 @@ public function testElevenLabsPlatformWithCustomEndpointCanBeRegistered()
39583955 $ this ->assertTrue ($ container ->hasDefinition ('ai.platform.elevenlabs ' ));
39593956
39603957 $ definition = $ container ->getDefinition ('ai.platform.elevenlabs ' );
3961-
39623958 $ this ->assertTrue ($ definition ->isLazy ());
39633959 $ this ->assertSame ([ElevenLabsPlatformFactory::class, 'create ' ], $ definition ->getFactory ());
39643960
39653961 $ this ->assertCount (6 , $ definition ->getArguments ());
39663962 $ this ->assertSame ('foo ' , $ definition ->getArgument (0 ));
39673963 $ this ->assertSame ('https://api.elevenlabs.io/v2 ' , $ definition ->getArgument (1 ));
39683964 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (2 ));
3969- $ this ->assertSame ('http_client ' , (string ) $ definition ->getArgument (2 ));
3965+ $ this ->assertSame ('ai.platform.elevenlabs.scoped_http_client ' , (string ) $ definition ->getArgument (2 ));
39703966 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (3 ));
39713967 $ this ->assertSame ('ai.platform.model_catalog.elevenlabs ' , (string ) $ definition ->getArgument (3 ));
3972- $ this ->assertNull ($ definition ->getArgument (4 ));
3968+ $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (4 ));
3969+ $ this ->assertSame ('ai.platform.contract.elevenlabs ' , (string ) $ definition ->getArgument (4 ));
39733970 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (5 ));
39743971 $ this ->assertSame ('event_dispatcher ' , (string ) $ definition ->getArgument (5 ));
39753972
@@ -3988,10 +3985,7 @@ public function testElevenLabsPlatformWithCustomEndpointCanBeRegistered()
39883985
39893986 $ this ->assertTrue ($ modelCatalogDefinition ->hasTag ('proxy ' ));
39903987 $ this ->assertSame ([['interface ' => ModelCatalogInterface::class]], $ modelCatalogDefinition ->getTag ('proxy ' ));
3991- }
39923988
3993- public function testElevenLabsPlatformWithCustomHttpClientCanBeRegistered ()
3994- {
39953989 $ container = $ this ->buildContainer ([
39963990 'ai ' => [
39973991 'platform ' => [
@@ -4012,12 +4006,13 @@ public function testElevenLabsPlatformWithCustomHttpClientCanBeRegistered()
40124006
40134007 $ this ->assertCount (6 , $ definition ->getArguments ());
40144008 $ this ->assertSame ('foo ' , $ definition ->getArgument (0 ));
4015- $ this ->assertSame ('https://api.elevenlabs.io/v1 ' , $ definition ->getArgument (1 ));
4009+ $ this ->assertSame ('https://api.elevenlabs.io/v1/ ' , $ definition ->getArgument (1 ));
40164010 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (2 ));
4017- $ this ->assertSame ('foo ' , (string ) $ definition ->getArgument (2 ));
4011+ $ this ->assertSame ('ai.platform.elevenlabs.scoped_http_client ' , (string ) $ definition ->getArgument (2 ));
40184012 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (3 ));
40194013 $ this ->assertSame ('ai.platform.model_catalog.elevenlabs ' , (string ) $ definition ->getArgument (3 ));
4020- $ this ->assertNull ($ definition ->getArgument (4 ));
4014+ $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (4 ));
4015+ $ this ->assertSame ('ai.platform.contract.elevenlabs ' , (string ) $ definition ->getArgument (4 ));
40214016 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (5 ));
40224017 $ this ->assertSame ('event_dispatcher ' , (string ) $ definition ->getArgument (5 ));
40234018
@@ -4036,10 +4031,7 @@ public function testElevenLabsPlatformWithCustomHttpClientCanBeRegistered()
40364031
40374032 $ this ->assertTrue ($ modelCatalogDefinition ->hasTag ('proxy ' ));
40384033 $ this ->assertSame ([['interface ' => ModelCatalogInterface::class]], $ modelCatalogDefinition ->getTag ('proxy ' ));
4039- }
40404034
4041- public function testElevenLabsPlatformWithApiCatalogCanBeRegistered ()
4042- {
40434035 $ container = $ this ->buildContainer ([
40444036 'ai ' => [
40454037 'platform ' => [
@@ -4061,12 +4053,13 @@ public function testElevenLabsPlatformWithApiCatalogCanBeRegistered()
40614053
40624054 $ this ->assertCount (6 , $ definition ->getArguments ());
40634055 $ this ->assertSame ('foo ' , $ definition ->getArgument (0 ));
4064- $ this ->assertSame ('https://api.elevenlabs.io/v1 ' , $ definition ->getArgument (1 ));
4056+ $ this ->assertSame ('https://api.elevenlabs.io/v1/ ' , $ definition ->getArgument (1 ));
40654057 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (2 ));
4066- $ this ->assertSame ('http_client ' , (string ) $ definition ->getArgument (2 ));
4058+ $ this ->assertSame ('ai.platform.elevenlabs.scoped_http_client ' , (string ) $ definition ->getArgument (2 ));
40674059 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (3 ));
40684060 $ this ->assertSame ('ai.platform.model_catalog.elevenlabs ' , (string ) $ definition ->getArgument (3 ));
4069- $ this ->assertNull ($ definition ->getArgument (4 ));
4061+ $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (4 ));
4062+ $ this ->assertSame ('ai.platform.contract.elevenlabs ' , (string ) $ definition ->getArgument (4 ));
40704063 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (5 ));
40714064 $ this ->assertSame ('event_dispatcher ' , (string ) $ definition ->getArgument (5 ));
40724065
@@ -4082,11 +4075,9 @@ public function testElevenLabsPlatformWithApiCatalogCanBeRegistered()
40824075
40834076 $ this ->assertSame (ElevenLabsApiCatalog::class, $ modelCatalogDefinition ->getClass ());
40844077 $ this ->assertTrue ($ modelCatalogDefinition ->isLazy ());
4085- $ this ->assertCount (3 , $ modelCatalogDefinition ->getArguments ());
4078+ $ this ->assertCount (1 , $ modelCatalogDefinition ->getArguments ());
40864079 $ this ->assertInstanceOf (Reference::class, $ modelCatalogDefinition ->getArgument (0 ));
4087- $ this ->assertSame ('http_client ' , (string ) $ modelCatalogDefinition ->getArgument (0 ));
4088- $ this ->assertSame ('foo ' , $ modelCatalogDefinition ->getArgument (1 ));
4089- $ this ->assertSame ('https://api.elevenlabs.io/v1 ' , $ modelCatalogDefinition ->getArgument (2 ));
4080+ $ this ->assertSame ('ai.platform.elevenlabs.scoped_http_client ' , (string ) $ modelCatalogDefinition ->getArgument (0 ));
40904081
40914082 $ this ->assertTrue ($ modelCatalogDefinition ->hasTag ('proxy ' ));
40924083 $ this ->assertSame ([['interface ' => ModelCatalogInterface::class]], $ modelCatalogDefinition ->getTag ('proxy ' ));
@@ -7602,7 +7593,7 @@ private function getFullConfig(): array
76027593 'api_key ' => 'foo ' ,
76037594 ],
76047595 'elevenlabs ' => [
7605- 'host ' => 'https://api.elevenlabs.io/v1 ' ,
7596+ 'endpoint ' => 'https://api.elevenlabs.io/v1 ' ,
76067597 'api_key ' => 'elevenlabs_key_full ' ,
76077598 ],
76087599 'failover ' => [
0 commit comments