A Google GenAI client instance
Optionaloptions: Partial<RunTreeConfig>LangSmith tracing configuration options
A wrapped client with automatic tracing enabled
import { GoogleGenAI } from "@google/genai";
import { wrapGemini } from "langsmith/wrappers/gemini";
const client = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
const wrapped = wrapGemini(client, { tracingEnabled: true });
// Use the wrapped client exactly like the original
const response = await wrapped.models.generateContent({
model: "gemini-2.0-flash-exp",
contents: "Hello!",
});
Wraps a Google Gemini client to enable automatic LangSmith tracing.
⚠️ BETA: This feature is in beta and may change in future releases.
Supports tracing for: