File tree Expand file tree Collapse file tree
src/agora_agent/agentkit/vendors Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -179,12 +179,11 @@ def to_config(self) -> Dict[str, Any]:
179179 if self .options .http_options is not None :
180180 params ["http_options" ] = self .options .http_options
181181
182- params ["project_id" ] = self .options .project_id
183- params ["location" ] = self .options .location
184- params ["adc_credentials_string" ] = self .options .adc_credentials_string
185-
186182 config : Dict [str , Any ] = {
187183 "vendor" : "vertexai" ,
184+ "project_id" : self .options .project_id ,
185+ "location" : self .options .location ,
186+ "adc_credentials_string" : self .options .adc_credentials_string ,
188187 "params" : params ,
189188 }
190189
Original file line number Diff line number Diff line change @@ -79,10 +79,12 @@ def test_vertex_ai_explicit_fields_override_additional_params():
7979 ).to_config ()
8080
8181 assert config ["vendor" ] == "vertexai"
82+ # routing fields are top-level, not inside params
83+ assert config ["project_id" ] == "explicit-project"
84+ assert config ["location" ] == "explicit-region"
85+ assert config ["adc_credentials_string" ] == "{}"
86+ # model and extra_key live inside params
8287 assert config ["params" ]["model" ] == "explicit-model"
83- assert config ["params" ]["project_id" ] == "explicit-project"
84- assert config ["params" ]["location" ] == "explicit-region"
85- assert config ["params" ]["adc_credentials_string" ] == "{}"
8688 assert config ["params" ]["extra_key" ] == "kept"
8789
8890
You can’t perform that action at this time.
0 commit comments