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

[bot] Replicate JS SDK (`replicate`) not instrumented — no tracing for prediction-based model execution (471,994 weekly downloads)

Aperta
#2,046 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

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
ai, observability

Direzione di ricerca

Inizia esaminando i pattern esistenti in js/src/wrappers/, js/src/instrumentation/plugins/, js/src/auto-instrumentations/configs/ e e2e/scenarios/. Definisci la copertura per replicate.run, predictions.create/get, wait e stream, quindi aggiungi la strumentazione e gli scenari e2e corrispondenti affinché le chiamate dirette al Replicate SDK producano span Braintrust.

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

Descrizione

Summary

The Replicate JavaScript SDK (replicate on npm) provides execution APIs for running arbitrary ML models via a prediction-based API that is not OpenAI-compatible. This repository has zero instrumentation for any Replicate SDK surface — no wrapper, no channels, no plugin, no auto-instrumentation config. Users who call the replicate npm SDK directly get no Braintrust spans.

What instrumentation is missing

The replicate npm package exposes these execution surfaces, none of which are instrumented:

SDK Method Description
replicate.run(model, { input }) Convenience method: creates a prediction, waits for completion, returns output
replicate.predictions.create({ version, input }) Create an asynchronous prediction (returns immediately)
replicate.predictions.get(id) Poll a prediction's current status
replicate.wait(prediction) Block until a prediction completes
replicate.stream(model, { input }) Stream model output as an AsyncGenerator

The Replicate API uses a prediction model distinct from any chat completions or embeddings pattern. Users call arbitrary ML models — image generation (FLUX, Stable Diffusion), audio (Whisper), video, LLMs — via the same prediction surface. This cannot be covered by wrapOpenAI() or any existing plugin.

No coverage in any instrumentation layer:

  • No wrapper function (e.g. wrapReplicate())
  • No diagnostics channels for Replicate methods
  • No plugin handler in js/src/instrumentation/plugins/
  • No auto-instrumentation config in js/src/auto-instrumentations/configs/
  • No e2e test scenarios

A grep for replicate across js/src/ returns zero matches.

Indirect coverage does not exist:

The Braintrust docs page at https://www.braintrust.dev/docs/integrations/ai-providers/replicate shows a gateway approach using the openai npm SDK pointed at https://gateway.braintrust.dev/v1. This only covers Replicate-hosted LLMs accessible via OpenAI-compatible chat completions through the gateway. Users who call replicate.run() or replicate.predictions.create() directly — which is the primary documented SDK usage and covers the full range of Replicate models — get no Braintrust spans at all.

Braintrust docs status

not_found for direct SDK instrumentation. The Braintrust integrations page lists Replicate as a supported provider, but the documented approach uses the openai package with the Braintrust gateway rather than instrumenting the replicate npm package itself.

Upstream references

Local files inspected

  • js/src/auto-instrumentations/configs/ — no Replicate config entry; full list: anthropic.ts, openai.ts, ai-sdk.ts, groq.ts, mistral.ts, cohere.ts, huggingface.ts, google-genai.ts, google-adk.ts, genkit.ts, openai-agents.ts, openrouter.ts, openrouter-agent.ts, claude-agent-sdk.ts, cursor-sdk.ts, github-copilot.ts, openai-codex.ts, flue.ts
  • js/src/instrumentation/plugins/ — no Replicate channels or plugin file
  • js/src/wrappers/ — no replicate.ts wrapper
  • e2e/scenarios/ — no Replicate test scenarios
  • Full repo grep for replicate in js/src/ — zero matches
Lingua principale
TypeScript
Stelle
29
Fork
16
Merge medio
1g 20h
PR unite (30g)
70

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.