Quickstart
Install the package, initialize the agent, and make the first proxied model call.
Proxy Helpers
Review the key flow and patched-client behavior.
Runtime Events
Review the event methods before composing hybrid flows.
Hybrid tracing
Use hybrid mode when the proxy already captures the model exchange, but you still want application-side tool timing and output.Prompt caching-aware usage
cacheReadTokens for tokens served from cache and cacheCreationTokens for tokens written into cache when your runtime exposes those values.
Self-hosted overrides
Event IDs you should understand
Common mistakes
- Calling
trace()methods without stabletraceIdvalues across the same workflow. - Mixing manual
llmResponse()events with proxied model responses for the same model turn when you only wanted one representation. - Forgetting to reuse
spanIdacross tool request and response events. - Overriding URLs request-by-request instead of setting
proxyBaseUrlandanalyseBaseUrlonce on theWhyOpsclient.