From 5514f37bed238dae371541cc95c46bbdae7761dd Mon Sep 17 00:00:00 2001 From: Shawn Yang Date: Thu, 8 Jan 2026 11:25:18 -0800 Subject: [PATCH] feat: Support Python 3.14 for reasoning engine. PiperOrigin-RevId: 853820058 --- vertexai/_genai/types/common.py | 42 +++++++++++-------- vertexai/agent_engines/_agent_engines.py | 2 +- .../reasoning_engines/_reasoning_engines.py | 2 +- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/vertexai/_genai/types/common.py b/vertexai/_genai/types/common.py index 7c48303729..d183fb4c14 100644 --- a/vertexai/_genai/types/common.py +++ b/vertexai/_genai/types/common.py @@ -5622,12 +5622,14 @@ class CreateAgentEngineConfig(_common.BaseModel): - If `source_packages` is specified, the agent framework will default to "custom".""", ) - python_version: Optional[Literal["3.9", "3.10", "3.11", "3.12", "3.13"]] = Field( - default=None, - description="""The Python version to be used for the Agent Engine. + python_version: Optional[Literal["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]] = ( + Field( + default=None, + description="""The Python version to be used for the Agent Engine. If not specified, it will use the current Python version of the environment. - Supported versions: "3.9", "3.10", "3.11", "3.12", "3.13". + Supported versions: "3.9", "3.10", "3.11", "3.12", "3.13", "3.14". """, + ) ) build_options: Optional[dict[str, list[str]]] = Field( default=None, @@ -5755,10 +5757,10 @@ class CreateAgentEngineConfigDict(TypedDict, total=False): - If `source_packages` is specified, the agent framework will default to "custom".""" - python_version: Optional[Literal["3.9", "3.10", "3.11", "3.12", "3.13"]] + python_version: Optional[Literal["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]] """The Python version to be used for the Agent Engine. If not specified, it will use the current Python version of the environment. - Supported versions: "3.9", "3.10", "3.11", "3.12", "3.13". + Supported versions: "3.9", "3.10", "3.11", "3.12", "3.13", "3.14". """ build_options: Optional[dict[str, list[str]]] @@ -6393,12 +6395,14 @@ class UpdateAgentEngineConfig(_common.BaseModel): - If `source_packages` is specified, the agent framework will default to "custom".""", ) - python_version: Optional[Literal["3.9", "3.10", "3.11", "3.12", "3.13"]] = Field( - default=None, - description="""The Python version to be used for the Agent Engine. + python_version: Optional[Literal["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]] = ( + Field( + default=None, + description="""The Python version to be used for the Agent Engine. If not specified, it will use the current Python version of the environment. - Supported versions: "3.9", "3.10", "3.11", "3.12", "3.13". + Supported versions: "3.9", "3.10", "3.11", "3.12", "3.13", "3.14". """, + ) ) build_options: Optional[dict[str, list[str]]] = Field( default=None, @@ -6531,10 +6535,10 @@ class UpdateAgentEngineConfigDict(TypedDict, total=False): - If `source_packages` is specified, the agent framework will default to "custom".""" - python_version: Optional[Literal["3.9", "3.10", "3.11", "3.12", "3.13"]] + python_version: Optional[Literal["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]] """The Python version to be used for the Agent Engine. If not specified, it will use the current Python version of the environment. - Supported versions: "3.9", "3.10", "3.11", "3.12", "3.13". + Supported versions: "3.9", "3.10", "3.11", "3.12", "3.13", "3.14". """ build_options: Optional[dict[str, list[str]]] @@ -13730,12 +13734,14 @@ class AgentEngineConfig(_common.BaseModel): - If `source_packages` is specified, the agent framework will default to "custom".""", ) - python_version: Optional[Literal["3.9", "3.10", "3.11", "3.12", "3.13"]] = Field( - default=None, - description="""The Python version to be used for the Agent Engine. + python_version: Optional[Literal["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]] = ( + Field( + default=None, + description="""The Python version to be used for the Agent Engine. If not specified, it will use the current Python version of the environment. - Supported versions: "3.9", "3.10", "3.11", "3.12", "3.13". + Supported versions: "3.9", "3.10", "3.11", "3.12", "3.13", "3.14". """, + ) ) build_options: Optional[dict[str, list[str]]] = Field( default=None, @@ -13895,10 +13901,10 @@ class AgentEngineConfigDict(TypedDict, total=False): - If `source_packages` is specified, the agent framework will default to "custom".""" - python_version: Optional[Literal["3.9", "3.10", "3.11", "3.12", "3.13"]] + python_version: Optional[Literal["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]] """The Python version to be used for the Agent Engine. If not specified, it will use the current Python version of the environment. - Supported versions: "3.9", "3.10", "3.11", "3.12", "3.13". + Supported versions: "3.9", "3.10", "3.11", "3.12", "3.13", "3.14". """ build_options: Optional[dict[str, list[str]]] diff --git a/vertexai/agent_engines/_agent_engines.py b/vertexai/agent_engines/_agent_engines.py index b6cad5cdd5..dd4e35269d 100644 --- a/vertexai/agent_engines/_agent_engines.py +++ b/vertexai/agent_engines/_agent_engines.py @@ -53,7 +53,7 @@ _LOGGER = _utils.LOGGER -_SUPPORTED_PYTHON_VERSIONS = ("3.9", "3.10", "3.11", "3.12", "3.13") +_SUPPORTED_PYTHON_VERSIONS = ("3.9", "3.10", "3.11", "3.12", "3.13", "3.14") _DEFAULT_GCS_DIR_NAME = "agent_engine" _BLOB_FILENAME = "agent_engine.pkl" _REQUIREMENTS_FILE = "requirements.txt" diff --git a/vertexai/reasoning_engines/_reasoning_engines.py b/vertexai/reasoning_engines/_reasoning_engines.py index 717a055a4d..322bf2a2d4 100644 --- a/vertexai/reasoning_engines/_reasoning_engines.py +++ b/vertexai/reasoning_engines/_reasoning_engines.py @@ -48,7 +48,7 @@ _LOGGER = base.Logger(__name__) -_SUPPORTED_PYTHON_VERSIONS = ("3.9", "3.10", "3.11", "3.12", "3.13") +_SUPPORTED_PYTHON_VERSIONS = ("3.9", "3.10", "3.11", "3.12", "3.13", "3.14") _DEFAULT_GCS_DIR_NAME = "reasoning_engine" _BLOB_FILENAME = "reasoning_engine.pkl" _REQUIREMENTS_FILE = "requirements.txt"