Summary
The @google/genai SDK v2.0.0+ (May 7, 2026) added an Interactions API (client.interactions.create()) — a new generative execution surface for multi-turn, stateful model interactions with structured step tracking. The Braintrust Gemini integration docs explicitly acknowledge this surface but note "This feature is available in Python only." The JavaScript SDK has zero instrumentation for interactions.* — no channels, no auto-instrumentation config, no wrapper proxy.
What instrumentation is missing
| SDK Method |
Description |
client.interactions.create({ model, input, config }) |
Submits input to a model and returns a structured Interaction response with output_text, execution steps (thoughts, search queries, function calls), and usage metadata |
client.interactions.create({ ..., stream: true }) |
Streaming variant returning an SSE stream of interaction events (interaction.created, interaction.completed) |
This is a standard HTTP generative execution call (not WebSocket-based) that produces model-generated content with usage metrics, tool call records, and intermediate reasoning steps — directly analogous to models.generateContent() but with stateful multi-turn and structured step support.
No coverage in any instrumentation layer:
- Auto-instrumentation config (
js/src/auto-instrumentations/configs/google-genai.ts): Only targets generateContentInternal, generateContentStreamInternal, and embedContentInternal on the Models class. No Interactions class entries.
- Channels (
js/src/instrumentation/plugins/google-genai-channels.ts): Only generateContent, generateContentStream, and embedContent channels defined. No interactions channel.
- Plugin (
js/src/instrumentation/plugins/google-genai-plugin.ts): No handler for interactions.* calls.
- Wrapper (
js/src/wrappers/google-genai.ts): Only intercepts the models property on the client. No interactions property proxy.
- Vendor types (
js/src/vendor-sdk-types/google-genai.ts): GoogleGenAIClient only declares models. No interactions property.
A grep for interactions across js/src/ returns zero matches related to this API.
Braintrust docs status
supported (Python only) — The Braintrust Gemini integration page at https://www.braintrust.dev/docs/integrations/ai-providers/gemini explicitly lists interactions.create/get/delete as a supported feature but with the note: "This feature is available in Python only." This directly calls out the JavaScript instrumentation gap.
Upstream references
Precedent in this repo
The equivalent models.generateContent() is already fully instrumented including:
- Non-streaming (
generateContentInternal)
- Streaming (
generateContentStreamInternal)
- Tool calling, grounding metadata, multi-turn content
- Token usage metrics
The Interactions API carries the same kind of model-generated output and usage metadata and is the recommended path for multi-turn agentic workflows in @google/genai v2.
Local files inspected
js/src/auto-instrumentations/configs/google-genai.ts — no Interactions class configs
js/src/instrumentation/plugins/google-genai-channels.ts — no interactions channel
js/src/instrumentation/plugins/google-genai-plugin.ts — no interactions handler
js/src/wrappers/google-genai.ts — only models property intercepted
js/src/vendor-sdk-types/google-genai.ts — no interactions property on client type
e2e/scenarios/google-genai-instrumentation/ — no interactions test scenarios
- Braintrust Gemini docs: https://www.braintrust.dev/docs/integrations/ai-providers/gemini — explicitly Python-only for this surface
Summary
The
@google/genaiSDK v2.0.0+ (May 7, 2026) added anInteractionsAPI (client.interactions.create()) — a new generative execution surface for multi-turn, stateful model interactions with structured step tracking. The Braintrust Gemini integration docs explicitly acknowledge this surface but note "This feature is available in Python only." The JavaScript SDK has zero instrumentation forinteractions.*— no channels, no auto-instrumentation config, no wrapper proxy.What instrumentation is missing
client.interactions.create({ model, input, config })output_text, execution steps (thoughts, search queries, function calls), and usage metadataclient.interactions.create({ ..., stream: true })interaction.created,interaction.completed)This is a standard HTTP generative execution call (not WebSocket-based) that produces model-generated content with usage metrics, tool call records, and intermediate reasoning steps — directly analogous to
models.generateContent()but with stateful multi-turn and structured step support.No coverage in any instrumentation layer:
js/src/auto-instrumentations/configs/google-genai.ts): Only targetsgenerateContentInternal,generateContentStreamInternal, andembedContentInternalon theModelsclass. NoInteractionsclass entries.js/src/instrumentation/plugins/google-genai-channels.ts): OnlygenerateContent,generateContentStream, andembedContentchannels defined. No interactions channel.js/src/instrumentation/plugins/google-genai-plugin.ts): No handler forinteractions.*calls.js/src/wrappers/google-genai.ts): Only intercepts themodelsproperty on the client. Nointeractionsproperty proxy.js/src/vendor-sdk-types/google-genai.ts):GoogleGenAIClientonly declaresmodels. Nointeractionsproperty.A grep for
interactionsacrossjs/src/returns zero matches related to this API.Braintrust docs status
supported(Python only) — The Braintrust Gemini integration page at https://www.braintrust.dev/docs/integrations/ai-providers/gemini explicitly listsinteractions.create/get/deleteas a supported feature but with the note: "This feature is available in Python only." This directly calls out the JavaScript instrumentation gap.Upstream references
@google/genaiv2.0.0 release (May 7, 2026): introduced Interactions API; breaking changes scoped to this API only (GenerateContent unaffected)@google/genaicurrent version: 2.8.0 (June 3, 2026)GenerateContentusage is unaffected."Precedent in this repo
The equivalent
models.generateContent()is already fully instrumented including:generateContentInternal)generateContentStreamInternal)The Interactions API carries the same kind of model-generated output and usage metadata and is the recommended path for multi-turn agentic workflows in @google/genai v2.
Local files inspected
js/src/auto-instrumentations/configs/google-genai.ts— noInteractionsclass configsjs/src/instrumentation/plugins/google-genai-channels.ts— no interactions channeljs/src/instrumentation/plugins/google-genai-plugin.ts— no interactions handlerjs/src/wrappers/google-genai.ts— onlymodelsproperty interceptedjs/src/vendor-sdk-types/google-genai.ts— nointeractionsproperty on client typee2e/scenarios/google-genai-instrumentation/— no interactions test scenarios