npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zhivex-ai/vertex

v0.7.9

Published

Vertex AI adapter for Zhivex AI SDK.

Downloads

1,165

Readme

@zhivex-ai/vertex

Vertex AI / Gemini Enterprise Agent Platform adapter for Zhivex AI SDK.

Supports Vertex Gemini text, embeddings, speech, realtime sessions, grounded generation, Context Caching, Batch API, raw prediction calls, and Google generative media endpoints for Gemini Image, Imagen, Veo, and Lyria.

Google is transitioning Vertex AI into Gemini Enterprise Agent Platform. The SDK keeps the package name @zhivex-ai/vertex, the factory createVertex(), and provider id "vertex" for backwards compatibility and because the public API endpoints still use aiplatform.googleapis.com. Treat "Vertex" in this package as the Google Cloud Agent Platform / Vertex API surface, not as a separate deprecated wire contract.

| Surface | Support | | --- | --- | | Text, tools, structured output, embeddings | high-level | | Context Caching and Batch API | high-level | | Google Search, URL Context, Code Execution, Computer Use | hosted tool helpers where the selected endpoint supports them | | Image, video, music generation | high-level | | Vertex publisher models / Model Garden | predictionModel() raw/prediction | | Gemini Files API, Gemini File Search stores, Interactions | explicit unsupported surface in this adapter |

import {
  createBatch,
  createContextCache,
  generateImage,
  generateMusic,
  generateText,
  generateVideo,
  googleUrlContextTool,
  predictRaw
} from "@zhivex-ai/core";
import { createVertex } from "@zhivex-ai/vertex";

const vertex = createVertex({
  apiKey: process.env.GOOGLE_API_KEY
});

const productionVertex = createVertex({
  projectId: process.env.GOOGLE_CLOUD_PROJECT,
  location: process.env.GOOGLE_CLOUD_LOCATION ?? "us-central1"
});

const advancedProductionVertex = createVertex({
  getAccessToken: async () => {
    // Optional: supply your own service-account or token-broker integration.
    return process.env.VERTEX_ACCESS_TOKEN!;
  },
  projectId: process.env.GOOGLE_CLOUD_PROJECT,
  location: process.env.GOOGLE_CLOUD_LOCATION ?? "us-central1"
});

await generateImage({
  model: productionVertex.imageGenerationModel!("imagen-4.0-generate-001"),
  prompt: "Create a product photo"
});

await generateVideo({
  model: productionVertex.videoGenerationModel!("veo-3.1-generate-preview"),
  prompt: "Create a cinematic establishing shot"
});

await generateMusic({
  model: productionVertex.musicGenerationModel!("lyria-002"),
  prompt: "Create a short instrumental intro"
});

await generateText({
  model: vertex("gemini-3.5-flash"),
  prompt: "Use URL context for the linked source.",
  tools: {
    urls: googleUrlContextTool()
  }
});

await createContextCache({
  provider: productionVertex,
  modelId: "gemini-3.5-flash",
  contents: [{ role: "user", parts: [{ type: "file", data: "gs://bucket/large.pdf", mediaType: "application/pdf" }] }]
});

await createBatch({
  provider: productionVertex,
  modelId: "gemini-3.5-flash",
  fileName: "files/batch-input"
});

await predictRaw({
  model: advancedProductionVertex.predictionModel!("publisher-model-id"),
  instances: [{ prompt: "provider-specific request" }],
  parameters: { temperature: 0.2 }
});

Authentication follows the current Google guidance for Gemini on Vertex AI: API keys are supported for testing with apiKey, VERTEX_API_KEY, or GOOGLE_API_KEY, while production can use automatic ADC with createVertex({ projectId, location }) or explicit service-account integrations through authClient, getAccessToken, or accessToken. See Google's guides for API keys, the Vertex AI quickstart, and Vertex AI authentication.

Google's current product page labels this surface as Gemini Enterprise Agent Platform, formerly Vertex AI, and Google's migration docs say Vertex AI is transitioning to become part of Agent Platform. This package intentionally does not rename the provider id yet; doing so would be a breaking API change without a corresponding endpoint-level migration requirement.

Model Garden coverage is intentionally raw/prediction based. The adapter does not add a dedicated wrapper for every publisher model.

Install

bun add @zhivex-ai/vertex

Repository and full documentation: