Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/agora_agent/agentkit/vendors/mllm.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ def to_config(self) -> Dict[str, Any]:
# matching the TypeScript SDK.
params: Dict[str, Any] = dict(self.options.additional_params or {})
params["model"] = self.options.model
params["project_id"] = self.options.project_id
params["location"] = self.options.location
params["adc_credentials_string"] = self.options.adc_credentials_string
if self.options.instructions is not None:
params["instructions"] = self.options.instructions
if self.options.voice is not None:
Expand All @@ -182,9 +185,6 @@ def to_config(self) -> Dict[str, Any]:
config: Dict[str, Any] = {
"vendor": "vertexai",
"url": self.options.url if self.options.url is not None else "",
"project_id": self.options.project_id,
"location": self.options.location,
"adc_credentials_string": self.options.adc_credentials_string,
"params": params,
}
if self.options.greeting_message is not None:
Expand Down
11 changes: 6 additions & 5 deletions tests/custom/test_agentkit_vendors.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,13 @@ def test_vertex_ai_explicit_fields_override_additional_params():
).to_config()

assert config["vendor"] == "vertexai"
# routing fields are top-level, not inside params
assert config["project_id"] == "explicit-project"
assert config["location"] == "explicit-region"
assert config["adc_credentials_string"] == "{}"
# model and extra_key live inside params
assert "project_id" not in config
assert "location" not in config
assert "adc_credentials_string" not in config
assert config["params"]["model"] == "explicit-model"
assert config["params"]["project_id"] == "explicit-project"
assert config["params"]["location"] == "explicit-region"
assert config["params"]["adc_credentials_string"] == "{}"
assert config["params"]["extra_key"] == "kept"


Expand Down
6 changes: 3 additions & 3 deletions tests/custom/test_request_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -1272,10 +1272,10 @@ def test_byok_vertex_ai_mllm_params() -> None:
props = build_properties(agent)
assert props["mllm"]["vendor"] == "vertexai"
assert props["mllm"]["url"] == ""
assert props["mllm"]["project_id"] == "my-project"
assert props["mllm"]["location"] == "us-central1"
assert props["mllm"]["adc_credentials_string"] == "{}"
assert props["mllm"]["params"]["model"] == "gemini-live-2.5-flash"
assert props["mllm"]["params"]["project_id"] == "my-project"
assert props["mllm"]["params"]["location"] == "us-central1"
assert props["mllm"]["params"]["adc_credentials_string"] == "{}"


def test_byok_xai_grok_mllm_params() -> None:
Expand Down
Loading