Skip to content

Commit ab21feb

Browse files
Ark-kuncopybara-github
authored andcommitted
feat: GenAI - Added support for "models/<model ID>" model name format
PiperOrigin-RevId: 592693755
1 parent c033c59 commit ab21feb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vertexai/generative_models/_generative_models.py

+2
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ def __init__(
152152
"""
153153
if "/" not in model_name:
154154
model_name = "publishers/google/models/" + model_name
155+
if model_name.startswith("models/"):
156+
model_name = "publishers/google/" + model_name
155157

156158
project = aiplatform_initializer.global_config.project
157159
location = aiplatform_initializer.global_config.location

0 commit comments

Comments
 (0)