Skip to main content
Wrap the provider client before using it. Calls retain their native arguments, results, exceptions, and streaming behavior. Instrumented calls attach to the active trace or create a standalone trace when needed. Finish or close streams so their trace can be finalized. Provider packages are optional. Install the provider you use alongside pandaprobe; the wrapper does not replace the provider’s own API reference. These functions instrument model calls, while the framework integrations also capture agent/tool structure. Import each wrapper from its documented provider subpath. There is no exported pandaprobe/wrappers aggregate or TypeScript LiteLLM wrapper. Bedrock instrumentation wraps the native client’s send method.

On this page

wrapAnthropic, wrapBedrock, wrapGemini, wrapMistral, wrapOpenAI.

Example

Install pandaprobe and openai with npm, yarn, or pnpm. Set both PandaProbe and OpenAI credentials before making model calls.

wrapAnthropic

Instrument an Anthropic client. Type parameters: T. Source declaration

wrapBedrock

Instrument an @aws-sdk/client-bedrock-runtime BedrockRuntimeClient. Type parameters: T. Source declaration

wrapGemini

Instrument a GoogleGenAI client. Type parameters: T. Source declaration

wrapMistral

Instrument a Mistral client. Type parameters: T. Source declaration

wrapOpenAI

Instrument an OpenAI or AzureOpenAI client (sync API is async in JS). Type parameters: T. Source declaration

Signatures and fields are generated from the SDK source. See the import index for available entry points.