Summary
The google-cloud-ai_platform gem is the official Google Ruby SDK for Vertex AI, published by Google in the googleapis/google-cloud-ruby monorepo. With 875K+ downloads and a release on June 11, 2026 (v2.4.0), it is the authoritative Ruby path for accessing Gemini models on Vertex AI and is not instrumented by this SDK.
The SDK instruments standalone provider clients for OpenAI, Anthropic, and (community) Gemini via gemini-ai, but has no instrumentation for the official Google Vertex AI generative execution surface.
What is missing
No instrumentation exists for any google-cloud-ai_platform generative execution surface. Key APIs that should be instrumented (via Google::Cloud::AIPlatform::V1::PredictionService::Client):
Generative Content (Gemini on Vertex AI)
generate_content(...) — Non-streaming generative content generation for Gemini models; accepts messages, system instruction, tools (function declarations), generation config (temperature, max_output_tokens, top_p, top_k, stop_sequences), safety settings, and response schema for structured output.
stream_generate_content(...) — Server-side streaming variant; yields GenerateContentResponse chunks with token usage in the final chunk.
Embeddings
embed_content(...) — Generates text embeddings via Gemini embedding models on Vertex AI.
General Prediction (non-Gemini Vertex models)
predict(...) — Online prediction for custom models and PaLM-family models.
raw_predict(...) / direct_predict(...) — Raw HTTP/gRPC prediction for arbitrary Vertex endpoints.
streaming_predict(...) / server_streaming_predict(...) — Streaming prediction variants.
Expected instrumentation
generate_content / stream_generate_content spans should capture:
- Input:
contents (messages array), system_instruction, tools (function declarations), tool_config
- Metadata: model endpoint/model ID,
generation_config (temperature, max_output_tokens, top_p, top_k, stop_sequences, response_mime_type, response_schema), safety settings, location/project
- Metrics:
usage_metadata (prompt_token_count, candidates_token_count, total_token_count) from response
- Output:
candidates content, finish_reason
Braintrust docs status
not_found — The SDK integrations page at https://www.braintrust.dev/docs/integrations/sdk-integrations lists only ruby-llm as a Ruby-specific integration. There is no documented Ruby instrumentation path for Google Vertex AI or google-cloud-ai_platform.
Upstream sources
Local repo files inspected
lib/braintrust/contrib.rb (lines 196–205) — registers only 4 integrations: OpenAI, RubyOpenAI, RubyLLM, Anthropic. No Google/Vertex integration.
lib/braintrust/contrib/ — contains only openai/, ruby_openai/, ruby_llm/, anthropic/, and rails/ directories. No google/ or vertex/ directory.
Appraisals — no appraisal scenarios for google-cloud-ai_platform
braintrust.gemspec — no mention of google or vertex
- Grep for
google, vertex, ai_platform across lib/braintrust/ returns zero matches
Summary
The
google-cloud-ai_platformgem is the official Google Ruby SDK for Vertex AI, published by Google in thegoogleapis/google-cloud-rubymonorepo. With 875K+ downloads and a release on June 11, 2026 (v2.4.0), it is the authoritative Ruby path for accessing Gemini models on Vertex AI and is not instrumented by this SDK.The SDK instruments standalone provider clients for OpenAI, Anthropic, and (community) Gemini via
gemini-ai, but has no instrumentation for the official Google Vertex AI generative execution surface.What is missing
No instrumentation exists for any
google-cloud-ai_platformgenerative execution surface. Key APIs that should be instrumented (viaGoogle::Cloud::AIPlatform::V1::PredictionService::Client):Generative Content (Gemini on Vertex AI)
generate_content(...)— Non-streaming generative content generation for Gemini models; accepts messages, system instruction, tools (function declarations), generation config (temperature, max_output_tokens, top_p, top_k, stop_sequences), safety settings, and response schema for structured output.stream_generate_content(...)— Server-side streaming variant; yieldsGenerateContentResponsechunks with token usage in the final chunk.Embeddings
embed_content(...)— Generates text embeddings via Gemini embedding models on Vertex AI.General Prediction (non-Gemini Vertex models)
predict(...)— Online prediction for custom models and PaLM-family models.raw_predict(...)/direct_predict(...)— Raw HTTP/gRPC prediction for arbitrary Vertex endpoints.streaming_predict(...)/server_streaming_predict(...)— Streaming prediction variants.Expected instrumentation
generate_content/stream_generate_contentspans should capture:contents(messages array),system_instruction,tools(function declarations),tool_configgeneration_config(temperature, max_output_tokens, top_p, top_k, stop_sequences, response_mime_type, response_schema), safety settings, location/projectusage_metadata(prompt_token_count, candidates_token_count, total_token_count) from responsecandidatescontent,finish_reasonBraintrust docs status
not_found— The SDK integrations page at https://www.braintrust.dev/docs/integrations/sdk-integrations lists onlyruby-llmas a Ruby-specific integration. There is no documented Ruby instrumentation path for Google Vertex AI orgoogle-cloud-ai_platform.Upstream sources
Local repo files inspected
lib/braintrust/contrib.rb(lines 196–205) — registers only 4 integrations: OpenAI, RubyOpenAI, RubyLLM, Anthropic. No Google/Vertex integration.lib/braintrust/contrib/— contains onlyopenai/,ruby_openai/,ruby_llm/,anthropic/, andrails/directories. Nogoogle/orvertex/directory.Appraisals— no appraisal scenarios forgoogle-cloud-ai_platformbraintrust.gemspec— no mention ofgoogleorvertexgoogle,vertex,ai_platformacrosslib/braintrust/returns zero matches