bug: expose agent_framework and labels in ReasoningEngine.create #6268
+71
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #6267
Description
This PR updates
ReasoningEngine.create(and _prepare) to acceptagent_framework,labels, andenv_vars. These parameters are passed down to the underlying ReasoningEngine resource creation.Motivation
Currently, deploying an ADK-based agent (
google-adk) via the Python SDK results in an agent that is missing critical metadata in the Vertex AI Console. Specifically:goog-vertex-reasoning-engine-framework: adklabel.OTEL_...environment variables into the deployment spec.without this metadata, the "Traces", "Sessions", and "Dashboards" tabs in the Vertex AI Console are disabled. This change allows users to set these values directly during creation, enabling full Console feature parity with Terraform deployments.
Changes
ReasoningEngine.create()signature to includeagent_framework,labels, andenv_vars._reasoning_engines._prepareto propagate these values.env_varsare correctly converted toaip_types.EnvVarprotos.tests/unit/vertex_langchain/test_reasoning_engines.pyto verify parameter passing.