@@ -111,8 +111,8 @@ def td() -> TestData:
111111 'parameters' : {
112112 'temperature' : 0.7 ,
113113 'tools' : [
114- {'name' : 'web_search' , 'parameters ' : {'maxResults' : 10 , 'region' : 'us' }},
115- {'name' : 'get_weather' , 'parameters ' : {'units' : 'celsius' }},
114+ {'name' : 'web_search' , 'customParameters ' : {'maxResults' : 10 , 'region' : 'us' }},
115+ {'name' : 'get_weather' , 'customParameters ' : {'units' : 'celsius' }},
116116 {'name' : 'calculator' },
117117 ],
118118 },
@@ -449,24 +449,24 @@ def test_completion_config_without_default_uses_disabled(ldai_client: LDAIClient
449449def test_tool_definition_basic ():
450450 tool = ToolDefinition ('web_search' )
451451 assert tool .name == 'web_search'
452- assert tool .get_parameter ('anything' ) is None
452+ assert tool .get_custom_parameter ('anything' ) is None
453453
454454
455- def test_tool_definition_with_parameters ():
456- tool = ToolDefinition ('web_search' , parameters = {'maxResults' : 10 , 'region' : 'us' })
455+ def test_tool_definition_with_custom_parameters ():
456+ tool = ToolDefinition ('web_search' , custom_parameters = {'maxResults' : 10 , 'region' : 'us' })
457457 assert tool .name == 'web_search'
458- assert tool .get_parameter ('maxResults' ) == 10
459- assert tool .get_parameter ('region' ) == 'us'
460- assert tool .get_parameter ('nonexistent' ) is None
458+ assert tool .get_custom_parameter ('maxResults' ) == 10
459+ assert tool .get_custom_parameter ('region' ) == 'us'
460+ assert tool .get_custom_parameter ('nonexistent' ) is None
461461
462462
463463def test_tool_definition_to_dict ():
464- tool = ToolDefinition ('web_search' , parameters = {'maxResults' : 10 })
464+ tool = ToolDefinition ('web_search' , custom_parameters = {'maxResults' : 10 })
465465 d = tool .to_dict ()
466- assert d == {'name' : 'web_search' , 'parameters ' : {'maxResults' : 10 }}
466+ assert d == {'name' : 'web_search' , 'customParameters ' : {'maxResults' : 10 }}
467467
468468
469- def test_tool_definition_to_dict_no_parameters ():
469+ def test_tool_definition_to_dict_no_custom_parameters ():
470470 tool = ToolDefinition ('calculator' )
471471 d = tool .to_dict ()
472472 assert d == {'name' : 'calculator' }
@@ -484,16 +484,16 @@ def test_completion_config_has_tools(ldai_client: LDAIClient):
484484
485485 web_search = config .tools [0 ]
486486 assert web_search .name == 'web_search'
487- assert web_search .get_parameter ('maxResults' ) == 10
488- assert web_search .get_parameter ('region' ) == 'us'
487+ assert web_search .get_custom_parameter ('maxResults' ) == 10
488+ assert web_search .get_custom_parameter ('region' ) == 'us'
489489
490490 get_weather = config .tools [1 ]
491491 assert get_weather .name == 'get_weather'
492- assert get_weather .get_parameter ('units' ) == 'celsius'
492+ assert get_weather .get_custom_parameter ('units' ) == 'celsius'
493493
494494 calculator = config .tools [2 ]
495495 assert calculator .name == 'calculator'
496- assert calculator .get_parameter ('anything' ) is None
496+ assert calculator .get_custom_parameter ('anything' ) is None
497497
498498
499499def test_completion_config_no_tools (ldai_client : LDAIClient ):
@@ -513,7 +513,7 @@ def test_completion_config_tools_missing_flag(ldai_client: LDAIClient):
513513 enabled = True ,
514514 model = ModelConfig ('fallback' ),
515515 messages = [],
516- tools = [ToolDefinition ('default_tool' , parameters = {'key' : 'value' })],
516+ tools = [ToolDefinition ('default_tool' , custom_parameters = {'key' : 'value' })],
517517 )
518518
519519 config = ldai_client .completion_config ('missing-flag' , context , default )
@@ -524,4 +524,4 @@ def test_completion_config_tools_missing_flag(ldai_client: LDAIClient):
524524 assert config .tools is not None
525525 assert len (config .tools ) == 1
526526 assert config .tools [0 ].name == 'default_tool'
527- assert config .tools [0 ].get_parameter ('key' ) == 'value'
527+ assert config .tools [0 ].get_custom_parameter ('key' ) == 'value'
0 commit comments