-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Describe the bug
Specifically for Langchain traces that make LLM calls to BedRock, we've noticed that input/output usage is reported as 0/0 after upgrading to v2.57.1 of the Python SDK. Total is still there, but because input and output is 0, there is no more cost tracking.
Example:
Simply reverting to v2.56.2 results in intput/output and cost to populate again.
All our other LLM calls going through LiteLLM to OpenAI, Anthropic, and Gemini all appear to have usage tracked as expected.
To reproduce
Simply use version v2.57.1 or newer of the Python SDK and create a LangChain chain with a ChatBedrock LLM. In our case, we were using anthropic.claude-3-5-sonnet-20240620-v1:0.
We also use the Langfuse CallbackHandler attached as a callback to the .invoke(... config={ ... }) call.
SDK and container versions
v2.57.1+
Python 3.12
Additional information
No response
Are you interested to contribute a fix for this bug?
Yes