close
Skip to content

feat: add support for env_vars to ReasoningEngine.create#6622

Open
EaCognitive wants to merge 1 commit intogoogleapis:mainfrom
EaCognitive:feat-reasoning-engine-env-vars
Open

feat: add support for env_vars to ReasoningEngine.create#6622
EaCognitive wants to merge 1 commit intogoogleapis:mainfrom
EaCognitive:feat-reasoning-engine-env-vars

Conversation

@EaCognitive
Copy link
Copy Markdown

Problem

The ReasoningEngine.create method in the Vertex AI SDK currently lacks support for passing environment variables (env_vars) to the reasoning engine at creation time. This is a fundamental requirement for many LangChain-based agents that rely on environment variables for configuration and secrets. While the newer AgentEngine class supports this, ReasoningEngine has fallen behind in feature parity.

Solution

This PR adds support for env_vars to ReasoningEngine.create. It also refactors the shared deployment specification logic into a new _utils.py module to ensure consistent behavior across both AgentEngine and ReasoningEngine.

Changes

  • Created vertexai/reasoning_engines/_utils.py to host shared deployment specification helper functions.
  • Updated vertexai/reasoning_engines/_reasoning_engines.py to accept and pass the env_vars parameter during resource creation.
  • Aligned ReasoningEngine with the AgentEngine implementation pattern.

Verification

  • Verified that env_vars are correctly mapped into the ReasoningEngineSpec.DeploymentSpec.
  • Consistent with established SDK patterns.

@EaCognitive EaCognitive requested a review from a team as a code owner April 21, 2026 17:10
@product-auto-label product-auto-label Bot added size: l Pull request size is large. api: vertex-ai Issues related to the googleapis/python-aiplatform API. labels Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: vertex-ai Issues related to the googleapis/python-aiplatform API. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant