Installation
Setup
- Sync
- Async
Messages API
Span name:"anthropic-messages", SpanKind: LLM
- Input: system prompt (from top-level
systemkwarg) plus messages, normalized to a standard format - Output: text content blocks
- Model name
- Token usage
- Model parameters:
temperature,top_p,top_k,max_tokens,stop_sequences, thinking configuration - Extended thinking or reasoning blocks stored in metadata as
reasoning_summary
Streaming
Extended thinking
When using Anthropic’s extended thinking feature, thinking blocks are automatically extracted and stored in the span metadata under thereasoning_summary key. Thinking content is stripped from the visible output.
Token usage mapping
| Anthropic Field | PandaProbe Field |
|---|---|
input_tokens | prompt_tokens |
output_tokens | completion_tokens |
cache_read_input_tokens | cache_read_tokens |
cache_creation_input_tokens | cache_creation_tokens |
