-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix(anthropic): record reasoning token usage #4461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
b906ea7
8ab20a1
2b85c8d
9f02a3a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -187,7 +187,7 @@ interactions: | |
|
|
||
| event: message_delta | ||
|
|
||
| data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"output_tokens":216} } | ||
| data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"output_tokens":216,"output_tokens_details":{"thinking_tokens":1024}} } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: rg -n 'message_start|message_delta|output_tokens|thinking_tokens|budget_tokens' packages/opentelemetry-instrumentation-anthropic/tests/cassettes/test_thinking/test_anthropic_thinking_streaming_legacy.yaml | head -45
sed -n '55,85p' packages/opentelemetry-instrumentation-anthropic/opentelemetry/instrumentation/anthropic/streaming.pyRepository: traceloop/openllmetry Length of output: 2183 🌐 Web query:
💡 Result: Use a valid thinking-token count in the streaming fixtures.
🤖 Prompt for AI Agents |
||
|
|
||
|
|
||
| event: message_stop | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: traceloop/openllmetry
Length of output: 6376
Update the Anthropic lockfile with the new test minimum.
packages/opentelemetry-instrumentation-anthropic/uv.lockresolvesanthropicto0.86.0, which does not satisfyanthropic[bedrock]>=1.8.0. Refresh and commit this package's lockfile so a lockeduv synccan resolve the test dependencies.🤖 Prompt for AI Agents