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

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

Abierto
#2,046 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

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

Línea de trabajo

Empieza revisando los patrones existentes en js/src/wrappers/, js/src/instrumentation/plugins/, js/src/auto-instrumentations/configs/ y e2e/scenarios/. Define la cobertura para replicate.run, predictions.create/get, wait y stream, y después añade la instrumentación y los escenarios e2e correspondientes para que las llamadas directas al Replicate SDK produzcan spans de Braintrust.

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

Descripción

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
Lenguaje dominante
TypeScript
Estrellas
28
Forks
15
Merge medio
1 d 20 h
PR fusionados (30 d)
70

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.