Skip to content

refactor(py)!: rename genkit-vertexai to genkit-model-garden - #137

Closed
huangjeff5 wants to merge 3 commits into
mainfrom
refactor/py-rename-model-garden-package
Closed

huangjeff5 wants to merge 3 commits into
mainfrom
refactor/py-rename-model-garden-package

Conversation

@huangjeff5

@huangjeff5 huangjeff5 commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

genkit-vertexai is now genkit-model-garden. The package only ever held the ModelGarden plugin (Claude, Llama and other OpenAI-compatible models through Google Cloud), so the new name says what's in it and drops the retired Vertex AI brand before 1.0. The ModelGarden class, its arguments and the modelgarden/ model names don't change, and genkit-vertexai stays as a deprecated alias through 0.x.

# before: uv add 'genkit-vertexai[anthropic]'
from genkit_vertexai import ModelGarden

# after: uv add 'genkit-model-garden[anthropic]'
from genkit_model_garden import ModelGarden

ai = Genkit(plugins=[ModelGarden(project='bistro-prod', location='us-east5')])
res = await ai.generate(model='modelgarden/anthropic/claude-sonnet-4-6', prompt='Suggest a dish.')
# => same plugin and same model names, so saved refs and .prompt files keep working

Why genkit-model-garden

  • The old name pointed users to the wrong place. People see "vertexai" and expect Gemini, but Gemini on Google Cloud is VertexAI in genkit-google-genai.
  • "Model Garden" is the name that held through the rebrand. Vertex AI became Gemini Enterprise Agent Platform, then "Gemini platform". The component name stayed the same; the current docs page is Overview of Model Garden.
  • It matches what we already ship. The class is ModelGarden and the namespace is modelgarden/ in every SDK, so the pip name, import path, class and refs now agree.
  • It's cheapest now. Python is pre-1.0, so the rename costs one release note.

Rejected:

  • Fold into genkit-google-genai. Model Garden runs on the Anthropic and OpenAI SDKs and shares only GCP auth with the Gemini package.
  • genkit-gemini-platform. "Gemini platform" isn't a branded name, and this package serves no Gemini.
  • genkit-google-cloud-models. Vague, and it no longer matches ModelGarden / modelgarden/.

Changes

  • New package genkit-model-garden, imported as genkit_model_garden. The [anthropic] and [openai] extras are unchanged.
  • genkit-vertexai becomes a deprecated alias. It depends on genkit-model-garden with the same extras, re-exports ModelGarden, and warns on import.
  • genkit[model-garden] replaces genkit[vertexai] and genkit[vertex-ai].
  • The README and docstrings point Gemini users to genkit-google-genai. The Model Garden docs link was returning a 404 and now points at the current page.

Internal only: the _model_garden/ subpackage is flattened into the package root.

What the package serves: the plugin routes on the model's publisher prefix. anthropic/... (Claude) goes through the Anthropic SDK's Vertex client and needs [anthropic]. Every other publisher goes to Model Garden's OpenAI-compatible endpoint and needs [openai]. Only two Llama models are listed in the Dev UI. Any other model name still resolves, with default capabilities.

How the alias works

# app.py, with genkit-vertexai 0.14
from genkit_vertexai import ModelGarden
# => app.py:1: FutureWarning: genkit-vertexai is now genkit-model-garden. Replace the dependency with
#    genkit-model-garden (same [anthropic] and [openai] extras) and import ModelGarden from
#    genkit_model_garden. genkit-vertexai gets no releases for Genkit 1.0.
  • Why FutureWarning: Python hides DeprecationWarning by default. FutureWarning is shown, and with stacklevel=2 it points at the user's import line.
  • It's removed by 1.0 by construction. genkit-vertexai joins ZERO_X_ONLY_PACKAGES (the same guard genkit-evaluators uses), so its pins are capped <1 and check_consistency fails a 1.0 version bump while the package still exists.
  • No genkit[vertexai] extra. The alias is for existing installs, so the "every package has a genkit[...] extra" guard test now exempts it.

Breaking changes

  • genkit[vertexai] / genkit[vertex-ai]: use genkit[model-garden] instead. pip and uv only warn on an unknown extra, so the old command installs genkit without Model Garden and the first error is a ModuleNotFoundError at import.
  • At 1.0: genkit-vertexai is gone, so from genkit_vertexai import ModelGarden has to become from genkit_model_garden import ModelGarden.

Before release

  • Register genkit-model-garden as a pending trusted publisher on PyPI. Without it, the OIDC publish step fails for this package.
  • Add a breaking-change entry to the 0.14 release notes (chore: release v0.14.0 #130).

Out of scope

  • The vertexai/ namespace and the VertexAI class live in genkit-google-genai, not here. A cross-SDK proposal for them is coming separately.
  • JS and Go. Their vertexai packages also contain vector search, evaluators and rerankers.

Verification

  • ruff, ty, the license checks, check_consistency and uv lock --check pass. pyright reports 0 errors on both packages. Workspace-wide pyright and pyrefly report the same errors as main.
  • pytest: 7721 passed, 44 skipped.
  • Clean venv built from the local wheels: pip install 'genkit-vertexai[anthropic]' pulls in genkit-model-garden, genkit-anthropic and anthropic. The import warns at the user's line, and ModelGarden is the same class as in genkit_model_garden.
  • bump_version dry runs on a copy of the workspace: 0.14.0 passes check_consistency, and 1.0.0 fails on genkit-vertexai.

@huangjeff5

Copy link
Copy Markdown
Collaborator Author

Consider reusing compat-oai.

@huangjeff5

Copy link
Copy Markdown
Collaborator Author

Superseded by #151, #196, #197, and #198, which move Model Garden models onto Anthropic(backend=GoogleCloud()) and OpenAICompatible(backend=GoogleCloud()) and deprecate genkit-vertexai.

@huangjeff5 huangjeff5 closed this Nov 30, 2026
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.

1 participant