-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Summary
The @google/genai SDK provides a stable models.embedContent() method for generating vector embeddings, but neither the wrapper (wrapGoogleGenAI) nor the auto-instrumentation plugin instruments it. By contrast, OpenAI's embeddings.create() is fully instrumented in both paths.
What is missing
- Wrapper (
js/src/wrappers/google-genai.ts):wrapModels()only proxiesgenerateContentandgenerateContentStream(lines 88–101).embedContentcalls pass through untraced. - Auto-instrumentation config (
js/src/auto-instrumentations/configs/google-genai.ts): Only defines configs forgenerateContentInternalandgenerateContentStreamInternal. No config forembedContent. - Plugin (
js/src/instrumentation/plugins/google-genai-plugin.ts): No channel or handler for embeddings.
Upstream reference
@google/genaiSDK —Models.embedContent(): API reference- Gemini Embeddings guide: https://ai.google.dev/gemini-api/docs/embeddings
- Supports models like
text-embedding-004andgemini-embedding-001, with config optionsoutputDimensionalityandtaskType.
Braintrust docs status
The Braintrust Google GenAI integration page documents generateContent only. Embeddings are not mentioned (not_found).
Precedent in this repo
OpenAI embeddings are instrumented in all three layers:
- Wrapper:
js/src/wrappers/oai.ts(lines 101–104,wrapEmbeddings) - Auto-instrumentation config:
js/src/auto-instrumentations/configs/openai.ts(lines 59–72) - Plugin:
js/src/instrumentation/plugins/openai-plugin.ts(lines 70–96)
Local files inspected
js/src/wrappers/google-genai.tsjs/src/auto-instrumentations/configs/google-genai.tsjs/src/instrumentation/plugins/google-genai-plugin.tsjs/src/instrumentation/plugins/google-genai-channels.tsjs/src/vendor-sdk-types/google-genai.ts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels