@raindrop-ai/vertex-ai
v0.0.2
Published
Raindrop integration for Vertex AI
Keywords
Readme
@raindrop-ai/vertex-ai
Raindrop integration for Google Vertex AI / Gen AI. Automatically captures models.generateContent() calls by wrapping the Google Gen AI client.
Installation
npm install @raindrop-ai/vertex-ai @google/genaiUsage
import { createRaindropVertexAI } from "@raindrop-ai/vertex-ai";
import { GoogleGenAI } from "@google/genai";
const raindrop = createRaindropVertexAI({ writeKey: "rk_...", userId: "user-123" });
const client = new GoogleGenAI({ apiKey: "..." });
const wrapped = raindrop.wrap(client);
const response = await wrapped.models.generateContent({
model: "gemini-2.0-flash",
contents: "Hello!",
});
await raindrop.shutdown();What gets captured
- generateContent: input text, output, model, token usage (promptTokenCount/candidatesTokenCount)
- Errors: captured with error status, re-thrown to caller
Options
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| writeKey | string | - | Raindrop API write key (omit to disable telemetry) |
| endpoint | string | https://api.raindrop.ai/v1/ | Raindrop API endpoint |
| userId | string | - | Associate all events with a user |
| convoId | string | - | Group events into a conversation |
| debug | boolean | false | Enable verbose logging |
Testing
pnpm test