fix: Remove 'per_agent' from kwargs when using remote session service URIs

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 837169299
This commit is contained in:
George Weale
2025-11-26 10:08:13 -08:00
committed by Copybara-Service
parent ec4ccd718f
commit 73e5687b9a
6 changed files with 10 additions and 82 deletions
+3 -16
View File
@@ -300,13 +300,11 @@ def test_create_artifact_service_defaults_to_file(tmp_path: Path) -> None:
assert expected_root.exists()
def test_create_artifact_service_per_agent_uses_shared_root(
def test_create_artifact_service_uses_shared_root(
tmp_path: Path,
) -> None:
"""Multi-agent mode should still use a single file artifact service."""
service = create_artifact_service_from_options(
base_dir=tmp_path, per_agent=True
)
"""Artifact service should use a single file artifact service."""
service = create_artifact_service_from_options(base_dir=tmp_path)
assert isinstance(service, FileArtifactService)
expected_root = Path(tmp_path) / ".adk" / "artifacts"
assert service.root_dir == expected_root
@@ -332,17 +330,6 @@ def test_create_artifact_service_accepts_file_uri(tmp_path: Path) -> None:
assert custom_root.exists()
def test_create_artifact_service_file_uri_rejects_per_agent(tmp_path: Path):
"""file:// URIs are incompatible with per-agent mode."""
custom_root = tmp_path / "custom"
with pytest.raises(ValueError, match="multi-agent"):
create_artifact_service_from_options(
base_dir=tmp_path,
artifact_service_uri=custom_root.as_uri(),
per_agent=True,
)
@pytest.mark.asyncio
async def test_run_cli_accepts_memory_scheme(
fake_agent, tmp_path: Path