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
Summary
The Replicate JavaScript SDK (
replicateon 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 thereplicatenpm SDK directly get no Braintrust spans.What instrumentation is missing
The
replicatenpm package exposes these execution surfaces, none of which are instrumented:replicate.run(model, { input })replicate.predictions.create({ version, input })replicate.predictions.get(id)replicate.wait(prediction)replicate.stream(model, { input })AsyncGeneratorThe 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:
wrapReplicate())js/src/instrumentation/plugins/js/src/auto-instrumentations/configs/A grep for
replicateacrossjs/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
openainpm SDK pointed athttps://gateway.braintrust.dev/v1. This only covers Replicate-hosted LLMs accessible via OpenAI-compatible chat completions through the gateway. Users who callreplicate.run()orreplicate.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_foundfor direct SDK instrumentation. The Braintrust integrations page lists Replicate as a supported provider, but the documented approach uses theopenaipackage with the Braintrust gateway rather than instrumenting thereplicatenpm package itself.Upstream references
replicatenpm package: https://www.npmjs.com/package/replicateLocal 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.tsjs/src/instrumentation/plugins/— no Replicate channels or plugin filejs/src/wrappers/— noreplicate.tswrappere2e/scenarios/— no Replicate test scenariosreplicateinjs/src/— zero matches