Skip to content

fix(studio): use public ADK StreamingMode import - #1233

Merged
yaozheng-fang merged 3 commits into
volcengine:mainfrom
xgtcode:fix/studio-adk-streaming-mode-compat
Nov 24, 2026
Merged

yaozheng-fang merged 3 commits into
volcengine:mainfrom
xgtcode:fix/studio-adk-streaming-mode-compat

Conversation

@xgtcode

@xgtcode xgtcode commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fix Studio-generated agent projects to import StreamingMode from the public ADK API path.
  • Update AgentKit and harness app runtime imports to avoid the same private ADK module dependency.
  • Add a generated-project regression assertion and refresh golden hashes for dynamic_a2a.py.

Background

Studio-generated projects currently pin google-adk==2.1.0, but the generated dynamic_a2a.py imported:

from google.adk.agents._streaming_mode import StreamingMode

That private module does not exist in google-adk==2.1.0, causing FaaS startup to fail with:

ModuleNotFoundError: No module named 'google.adk.agents._streaming_mode'

The public path is available in the generated project’s pinned ADK version and in the current repository dependency range:

from google.adk.agents.run_config import StreamingMode

Verification

  • uv run --extra dev pre-commit run --all-files
  • uv run --extra dev pytest tests/cli/test_generated_agent_backend_codegen_extended.py tests/cloud/test_harness_app_http.py tests/cli/test_generated_agent_component_matrix.py::test_a2a_registry_center_generates_tools_and_env tests/cli/test_generated_agent_component_matrix.py::test_nested_a2a_registry_agent_generates_dynamic_helper tests/integrations/agentkit/test_app.py tests/test_adk_tracing_integration.py -q
  • uv run --isolated --with google-adk==2.1.0 python - <<'PY' from google.adk.agents.run_config import StreamingMode print("ok", StreamingMode.SSE.name, StreamingMode.NONE.name) PY

Compatibility

This is a non-breaking compatibility fix. It does not change generated agent behavior, A2A behavior, dependency versions, or public APIs. It only replaces a private ADK import with the public import path supported by the affected dependency versions.

@yaozheng-fang
yaozheng-fang merged commit dc72894 into volcengine:main Nov 24, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants