Summary
The Vertex AI Python SDK (google-cloud-aiplatform, imported as vertexai) is Google Cloud's enterprise Python SDK for generative AI. It is actively maintained with frequent weekly releases (v1.159.0 as of July 2026) and provides GenerativeModel.generate_content() for chat/text generation, TextEmbeddingModel.get_embeddings() for embeddings, and Vertex AI Agent Builder via vertexai.preview.reasoning_engines for agent execution. This repository has zero instrumentation for any google-cloud-aiplatform execution surface — no integration directory, no wrapper, no patcher, no auto_instrument() support.
This is a distinct package from google-generativeai/google-genai, which is already instrumented as GoogleGenAIIntegration. The existing integration covers the google-genai SDK (including its optional Vertex AI backend mode via genai.Client(vertexai=True)), but google-cloud-aiplatform is a completely separate Python package with different APIs, different authentication (Google Cloud IAM/ADC vs. Google API keys), and a different class hierarchy.
Enterprise Google Cloud users who pip install google-cloud-aiplatform and use vertexai.generative_models.GenerativeModel directly get zero Braintrust spans today.
Comparable provider SDKs with dedicated integrations in this repo: anthropic, openai, mistral, cohere, google_genai, huggingface_hub, bedrock_runtime.
What needs to be instrumented
The google-cloud-aiplatform package exposes these execution surfaces, none of which are instrumented:
Generative AI — text and chat generation (highest priority)
| Class / Method |
Description |
Return type |
GenerativeModel.generate_content(contents, ...) |
Synchronous text/chat generation — core execution surface |
GenerationResponse |
GenerativeModel.generate_content_async(contents, ...) |
Async variant |
Coroutine[GenerationResponse] |
GenerativeModel.generate_content(..., stream=True) |
Streaming generation |
Iterable[GenerationResponse] |
ChatSession.send_message(content, ...) |
Multi-turn chat, maintains history |
GenerationResponse |
ChatSession.send_message_async(content, ...) |
Async multi-turn chat |
Coroutine[GenerationResponse] |
GenerationResponse includes text (generated content), usage_metadata (prompt_token_count, candidates_token_count, total_token_count), candidates[0].finish_reason, and candidates[0].safety_ratings. Token counts are directly available for span metrics.
Embeddings
| Class / Method |
Description |
Return type |
TextEmbeddingModel.get_embeddings(texts, ...) |
Generate dense vector embeddings for a list of texts |
list[TextEmbedding] |
TextEmbeddingModel.get_embeddings_async(texts, ...) |
Async embeddings |
Coroutine[list[TextEmbedding]] |
TextEmbedding includes values (embedding vector), statistics.token_count. The model name is available from the instantiated TextEmbeddingModel.
Vertex AI Agent Builder (agent execution)
| Class / Method |
Description |
Return type |
reasoning_engine.query(input, ...) |
Execute a deployed Vertex AI Agent Builder agent |
varies |
AdkApp.query(input, ...) |
Execute an Agent Development Kit (ADK) agent deployed on Vertex |
varies |
vertexai.preview.reasoning_engines.ReasoningEngine.query() and .query_async() are the primary entry points for running agents deployed via Vertex AI Agent Builder. Each call may invoke multiple LLM calls and tool uses internally.
Key distinction from existing google_genai integration
|
google-genai (COVERED) |
google-cloud-aiplatform (NOT COVERED) |
| PyPI package |
google-generativeai or google-genai |
google-cloud-aiplatform |
| Import |
import google.genai |
import vertexai or from google.cloud import aiplatform |
| Auth |
Google API key or Vertex AI via vertexai=True flag |
Google Cloud ADC / service account / IAM |
| Primary use case |
Google AI Studio, rapid prototyping |
Enterprise GCP, Vertex AI platform |
| Client class |
genai.Client() |
vertexai.generative_models.GenerativeModel(model_name) |
| Installation |
pip install google-generativeai |
pip install google-cloud-aiplatform |
The existing google_genai integration's vertexai flag check (in tracing.py) handles serialization differences for google-genai used with vertexai=True — it does NOT instrument google-cloud-aiplatform.
No coverage in any instrumentation layer
- No integration directory (
py/src/braintrust/integrations/vertex_ai/)
- No wrapper function (e.g.
wrap_vertex_ai())
- No patcher in any existing integration
- No nox test session (
test_vertex_ai)
- No version entry in
py/src/braintrust/integrations/versioning.py
- No mention in
py/src/braintrust/integrations/__init__.py
A grep for google.cloud.aiplatform, from vertexai, and import vertexai across py/src/braintrust/ returns zero matches. The only occurrences of "vertex" in the SDK source (google_genai/tracing.py:171,175) are handling serialization for the google-genai SDK's Vertex AI mode — not the google-cloud-aiplatform package.
Braintrust docs status
not_found — google-cloud-aiplatform / Vertex AI Python SDK is not listed on the Braintrust integrations directory or the tracing guide. The documented "Gemini" integration maps to the existing google_genai integration. There is no auto_instrument() reference for vertexai, no wrap_vertex_ai() function, and no Vertex AI SDK setup documentation anywhere in Braintrust docs.
Upstream references
Local repo files inspected
py/src/braintrust/integrations/ — no vertex_ai/ directory exists on main
py/src/braintrust/wrappers/ — no Vertex AI wrapper
py/noxfile.py — no test_vertex_ai session
py/pyproject.toml [tool.braintrust.matrix] — no google-cloud-aiplatform entry
py/src/braintrust/integrations/__init__.py — Vertex AI not listed in integration registry
py/src/braintrust/integrations/versioning.py — no Vertex AI version matrix
py/src/braintrust/integrations/google_genai/tracing.py — vertexai flag handling is for google-genai SDK only
- Full repo grep for
google.cloud.aiplatform, from vertexai, import vertexai — zero matches in SDK source
Summary
The Vertex AI Python SDK (
google-cloud-aiplatform, imported asvertexai) is Google Cloud's enterprise Python SDK for generative AI. It is actively maintained with frequent weekly releases (v1.159.0 as of July 2026) and providesGenerativeModel.generate_content()for chat/text generation,TextEmbeddingModel.get_embeddings()for embeddings, and Vertex AI Agent Builder viavertexai.preview.reasoning_enginesfor agent execution. This repository has zero instrumentation for anygoogle-cloud-aiplatformexecution surface — no integration directory, no wrapper, no patcher, noauto_instrument()support.This is a distinct package from
google-generativeai/google-genai, which is already instrumented asGoogleGenAIIntegration. The existing integration covers thegoogle-genaiSDK (including its optional Vertex AI backend mode viagenai.Client(vertexai=True)), butgoogle-cloud-aiplatformis a completely separate Python package with different APIs, different authentication (Google Cloud IAM/ADC vs. Google API keys), and a different class hierarchy.Enterprise Google Cloud users who
pip install google-cloud-aiplatformand usevertexai.generative_models.GenerativeModeldirectly get zero Braintrust spans today.Comparable provider SDKs with dedicated integrations in this repo:
anthropic,openai,mistral,cohere,google_genai,huggingface_hub,bedrock_runtime.What needs to be instrumented
The
google-cloud-aiplatformpackage exposes these execution surfaces, none of which are instrumented:Generative AI — text and chat generation (highest priority)
GenerativeModel.generate_content(contents, ...)GenerationResponseGenerativeModel.generate_content_async(contents, ...)Coroutine[GenerationResponse]GenerativeModel.generate_content(..., stream=True)Iterable[GenerationResponse]ChatSession.send_message(content, ...)GenerationResponseChatSession.send_message_async(content, ...)Coroutine[GenerationResponse]GenerationResponseincludestext(generated content),usage_metadata(prompt_token_count,candidates_token_count,total_token_count),candidates[0].finish_reason, andcandidates[0].safety_ratings. Token counts are directly available for span metrics.Embeddings
TextEmbeddingModel.get_embeddings(texts, ...)list[TextEmbedding]TextEmbeddingModel.get_embeddings_async(texts, ...)Coroutine[list[TextEmbedding]]TextEmbeddingincludesvalues(embedding vector),statistics.token_count. The model name is available from the instantiatedTextEmbeddingModel.Vertex AI Agent Builder (agent execution)
reasoning_engine.query(input, ...)AdkApp.query(input, ...)vertexai.preview.reasoning_engines.ReasoningEngine.query()and.query_async()are the primary entry points for running agents deployed via Vertex AI Agent Builder. Each call may invoke multiple LLM calls and tool uses internally.Key distinction from existing
google_genaiintegrationgoogle-genai(COVERED)google-cloud-aiplatform(NOT COVERED)google-generativeaiorgoogle-genaigoogle-cloud-aiplatformimport google.genaiimport vertexaiorfrom google.cloud import aiplatformvertexai=Trueflaggenai.Client()vertexai.generative_models.GenerativeModel(model_name)pip install google-generativeaipip install google-cloud-aiplatformThe existing
google_genaiintegration'svertexaiflag check (intracing.py) handles serialization differences forgoogle-genaiused withvertexai=True— it does NOT instrumentgoogle-cloud-aiplatform.No coverage in any instrumentation layer
py/src/braintrust/integrations/vertex_ai/)wrap_vertex_ai())test_vertex_ai)py/src/braintrust/integrations/versioning.pypy/src/braintrust/integrations/__init__.pyA grep for
google.cloud.aiplatform,from vertexai, andimport vertexaiacrosspy/src/braintrust/returns zero matches. The only occurrences of "vertex" in the SDK source (google_genai/tracing.py:171,175) are handling serialization for thegoogle-genaiSDK's Vertex AI mode — not thegoogle-cloud-aiplatformpackage.Braintrust docs status
not_found—google-cloud-aiplatform/ Vertex AI Python SDK is not listed on the Braintrust integrations directory or the tracing guide. The documented "Gemini" integration maps to the existinggoogle_genaiintegration. There is noauto_instrument()reference forvertexai, nowrap_vertex_ai()function, and no Vertex AI SDK setup documentation anywhere in Braintrust docs.Upstream references
Local repo files inspected
py/src/braintrust/integrations/— novertex_ai/directory exists onmainpy/src/braintrust/wrappers/— no Vertex AI wrapperpy/noxfile.py— notest_vertex_aisessionpy/pyproject.toml[tool.braintrust.matrix]— no google-cloud-aiplatform entrypy/src/braintrust/integrations/__init__.py— Vertex AI not listed in integration registrypy/src/braintrust/integrations/versioning.py— no Vertex AI version matrixpy/src/braintrust/integrations/google_genai/tracing.py—vertexaiflag handling is forgoogle-genaiSDK onlygoogle.cloud.aiplatform,from vertexai,import vertexai— zero matches in SDK source