Summary
Perplexity publishes an official TypeScript SDK: @perplexity-ai/perplexity_ai on npm (v0.33.0, actively maintained). It is a Stainless-generated client with its own HTTP layer — it does not depend on the openai npm package. This repository has zero instrumentation for any @perplexity-ai/perplexity_ai surface — no wrapper, no channels, no plugin, no auto-instrumentation config. Users who call @perplexity-ai/perplexity_ai directly get no Braintrust spans.
What instrumentation is missing
The @perplexity-ai/perplexity_ai npm package exposes these execution surfaces, none of which are instrumented:
| SDK Method |
Description |
client.chat.completions.create({ model, messages }) |
Chat completions with real-time web search grounding |
client.chat.completions.create({ ..., stream: true }) |
Streaming chat completions |
client.search.create({ query, ... }) |
Ranked web search results (multi-query, domain/date filtering) |
client.responses.create({ input, model }) |
Simpler response generation interface |
The SDK has its own HTTP layer (custom undici/Bun/Deno client support) and is not patched by the existing openai auto-instrumentation.
No coverage in any instrumentation layer:
- No wrapper function (e.g.
wrapPerplexity())
- No diagnostics channels for Perplexity methods
- No plugin handler in
js/src/instrumentation/plugins/
- No auto-instrumentation config in
js/src/auto-instrumentations/configs/
- No e2e test scenarios
- Grep for
perplexity across js/src/ returns zero matches
Indirect coverage is insufficient:
Braintrust's Perplexity integration page documents a gateway/OpenAI SDK approach — pointing the openai npm client at https://gateway.braintrust.dev/v1 to route Perplexity model calls. Users who call @perplexity-ai/perplexity_ai directly — which is Perplexity's own official TypeScript client with its own HTTP layer — get no spans at all under that approach. The search.create() surface (web search with citations) has no equivalent in the gateway approach.
Braintrust docs status
not_found for direct SDK instrumentation. The Braintrust Perplexity integration page documents a gateway/OpenAI SDK approach only and does not reference @perplexity-ai/perplexity_ai.
Upstream references
Local files inspected
js/src/auto-instrumentations/configs/ — full config 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, strands-agent-sdk.ts, pi-coding-agent.ts, bedrock-runtime.ts — no Perplexity config present
js/src/instrumentation/plugins/ — no Perplexity channels or plugin file
js/src/wrappers/ — no perplexity.ts wrapper file
e2e/scenarios/ — no Perplexity test scenarios
- Full repo grep for
perplexity in js/src/ — zero matches
Summary
Perplexity publishes an official TypeScript SDK:
@perplexity-ai/perplexity_aion npm (v0.33.0, actively maintained). It is a Stainless-generated client with its own HTTP layer — it does not depend on theopenainpm package. This repository has zero instrumentation for any@perplexity-ai/perplexity_aisurface — no wrapper, no channels, no plugin, no auto-instrumentation config. Users who call@perplexity-ai/perplexity_aidirectly get no Braintrust spans.What instrumentation is missing
The
@perplexity-ai/perplexity_ainpm package exposes these execution surfaces, none of which are instrumented:client.chat.completions.create({ model, messages })client.chat.completions.create({ ..., stream: true })client.search.create({ query, ... })client.responses.create({ input, model })The SDK has its own HTTP layer (custom undici/Bun/Deno client support) and is not patched by the existing
openaiauto-instrumentation.No coverage in any instrumentation layer:
wrapPerplexity())js/src/instrumentation/plugins/js/src/auto-instrumentations/configs/perplexityacrossjs/src/returns zero matchesIndirect coverage is insufficient:
Braintrust's Perplexity integration page documents a gateway/OpenAI SDK approach — pointing the
openainpm client athttps://gateway.braintrust.dev/v1to route Perplexity model calls. Users who call@perplexity-ai/perplexity_aidirectly — which is Perplexity's own official TypeScript client with its own HTTP layer — get no spans at all under that approach. Thesearch.create()surface (web search with citations) has no equivalent in the gateway approach.Braintrust docs status
not_foundfor direct SDK instrumentation. The Braintrust Perplexity integration page documents a gateway/OpenAI SDK approach only and does not reference@perplexity-ai/perplexity_ai.Upstream references
@perplexity-ai/perplexity_ainpm package: https://www.npmjs.com/package/@perplexity-ai/perplexity_aiLocal files inspected
js/src/auto-instrumentations/configs/— full config 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,strands-agent-sdk.ts,pi-coding-agent.ts,bedrock-runtime.ts— no Perplexity config presentjs/src/instrumentation/plugins/— no Perplexity channels or plugin filejs/src/wrappers/— noperplexity.tswrapper filee2e/scenarios/— no Perplexity test scenariosperplexityinjs/src/— zero matches