/** * pi-ai (@mariozechner/pi-ai) auto-instrumentation for bloop LLM tracing. * * Wraps `complete()` and `stream()` to automatically capture: * - Model, provider, tokens, latency, TTFT (streaming), errors * - Cost is always 0 -- calculated server-side from pricing table * * Works with all pi-ai providers: OpenAI, Anthropic, Google, Mistral, * OpenRouter, Groq, xAI, Cerebras, Azure, Bedrock, and any * OpenAI-compatible endpoint. */ import type { BloopClient } from "../client"; /** * Wrap pi-ai's `complete()` function for automatic tracing. * * Usage: * import { complete, getModel } from "@mariozechner/pi-ai"; * const tracedComplete = bloop.wrapPiAiComplete(complete); * const model = getModel("openai", "gpt-4o"); * const response = await tracedComplete(model, context); */ export declare function wrapPiAiComplete(completeFn: Function, bloopClient: BloopClient): Function; /** * Wrap pi-ai's `stream()` function for automatic tracing. * * Usage: * import { stream, getModel } from "@mariozechner/pi-ai"; * const tracedStream = bloop.wrapPiAiStream(stream); * const model = getModel("openai", "gpt-4o"); * const eventStream = tracedStream(model, context); * for await (const event of eventStream) { ... } * const result = await eventStream.result(); */ export declare function wrapPiAiStream(streamFn: Function, bloopClient: BloopClient): Function;