Skip to content

Google GenAI: embed_content not instrumented #105

@AbhiPrasad

Description

Gap

The Google GenAI SDK's embed_content method (client.models.embed_content() / client.aio.models.embed_content()) is not instrumented by the Braintrust wrapper. Embeddings are a core AI API surface used in RAG pipelines, semantic search, and clustering — and Braintrust already instruments embeddings for other providers (OpenAI via EmbeddingV1Wrapper, LiteLLM via EmbeddingWrapper).

What is missing

  • client.models.embed_content() (sync)
  • client.aio.models.embed_content() (async)

These methods accept model, contents, and config (with task_type, output_dimensionality) and return embedding vectors with metadata.

Braintrust docs status

not_found — the Gemini integration page at braintrust.dev/docs/integrations/ai-providers/gemini documents generateContent and streaming but does not mention embeddings.

Upstream sources

Local files inspected

  • py/src/braintrust/wrappers/google_genai/__init__.pysetup_genai() patches Models._generate_content and Models.generate_content_stream (and async variants) but not embed_content. Confirmed via grep: zero references to embed_content or embedding in the file.
  • py/src/braintrust/wrappers/test_google_genai.py — no embedding test cases
  • py/noxfile.pytest_google_genai session exists but only tests generation

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions