Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#2,343 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@lforst ci sta già lavorando.

Dal 20/8/2026.

  • #2389 di @lforst — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
observability

Direzione di ricerca

Inizia dai quattro canali esistenti in js/src/instrumentation/plugins/google-genai-channels.ts e traccia il modo in cui vengono wrappati e gestiti in js/src/wrappers/google-genai.ts e google-genai-plugin.ts. Poi esamina i vendored types, la configurazione dell’auto-instrumentazione e gli scenari e2e esistenti. Il lavoro è completo quando le operazioni batch sono rappresentate in queste aree ed è presente una copertura e2e per la strumentazione risultante.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
TypeScript
Stelle
29
Fork
16
Merge medio
1g 22h
PR unite (30g)
72

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di braintrustdata/braintrust-sdk-javascript

Tutte le issue di braintrustdata/braintrust-sdk-javascript

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.