Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[bot] Google GenAI Batch API (`ai.batches.create()`) not instrumented

Abierto
#2,343 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@lforst ya está trabajando en esto.

Desde el 20/8/2026.

  • #2389 de @lforst — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Empieza por los cuatro canales existentes en js/src/instrumentation/plugins/google-genai-channels.ts y sigue cómo se envuelven y manejan en js/src/wrappers/google-genai.ts y google-genai-plugin.ts. Después, inspecciona los vendored types, la configuración de auto-instrumentación y los escenarios e2e existentes. El trabajo estará terminado cuando las operaciones por lotes estén representadas en estas áreas y exista cobertura e2e para la instrumentación resultante.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

stale

Summary

The @google/genai SDK's Batch API (ai.batches.create() / client.batches.*) is a documented, GA generative-execution surface for asynchronous, high-throughput generateContent (and embeddings) processing at a 50% cost discount. It is not instrumented anywhere in this repository — no wrapper support, no channel definitions, no plugin, no auto-instrumentation config entry, and no e2e coverage.

What instrumentation is missing

Channels (js/src/instrumentation/plugins/google-genai-channels.ts)

googleGenAIChannels (lines 20–57) defines only four channels: generateContent, generateContentStream, embedContent, and interactionsCreate. There is no batches-related channel.

Wrapper (js/src/wrappers/google-genai.ts)

wrapModels() (lines 118–133) proxies only generateContent, generateContentStream, and embedContent on instance.models. The instance.batches namespace (ai.batches.create(), .get(), .list(), .cancel()) is not proxied at all and passes through completely untraced.

Plugin (js/src/instrumentation/plugins/google-genai-plugin.ts)

Only subscribes to the four existing channels above — no batch handler exists.

Vendored types (js/src/vendor-sdk-types/google-genai.ts)

No type exists for the batches namespace or its request/response/job-status shapes.

Auto-instrumentation config (js/src/auto-instrumentations/configs/google-genai.ts)

No batch-related entry.

e2e coverage (e2e/scenarios/google-genai-instrumentation/)

No batch-related scenario, cassette, or span-tree snapshot among the existing google-genai-v1/v2 (pinned + latest) scenarios.

Upstream operations not instrumented
  • ai.batches.create({ model, src, config }) — submit a batch job (file-based or inline requests) for generateContent
  • ai.batches.create_embeddings(...) — submit a batch job for embeddings
  • ai.batches.get(name) — poll job status (JOB_STATE_SUCCEEDED, etc.)
  • ai.batches.list() — list batch jobs
  • ai.batches.cancel(name) — cancel a batch job

Braintrust docs status

not_found. The Braintrust Gemini integration guide (https://www.braintrust.dev/docs/integrations/ai-providers/gemini) documents generateContent/generateContentStream, embedContent, grounding metadata, generate_images (Python only), and interactions/Live API (Python only) — but does not mention batch processing anywhere.

Upstream references

Braintrust docs sources checked

Local files inspected

  • js/src/instrumentation/plugins/google-genai-channels.ts (full file — only 4 channels defined, no batches)
  • js/src/instrumentation/plugins/google-genai-plugin.ts (subscribes only to the 4 existing channels)
  • js/src/wrappers/google-genai.ts (full file — wrapModels() proxies only generateContent/generateContentStream/embedContent; instance.batches untouched)
  • js/src/vendor-sdk-types/google-genai.ts (no batches type)
  • js/src/auto-instrumentations/configs/google-genai.ts (no batches entry)
  • e2e/scenarios/google-genai-instrumentation/ (full directory listing — no batch scenario/cassette/snapshot)
  • Repo-wide case-insensitive grep for batch under js/src — zero matches related to Google GenAI
Lenguaje dominante
TypeScript
Estrellas
29
Forks
16
Merge medio
1 d 16 h
PR fusionados (30 d)
64

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de braintrustdata/braintrust-sdk-javascript

Todos los issues de braintrustdata/braintrust-sdk-javascript

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.