Same agent Smaller bill. The tools and infrastructure to get more work from your AI. Fewer tokens. Less compute. Lower cost.
TypeScript agent-harnessagent-harness-engineeringai-engineeringai-observabilityamd-gpuclaude-codeclickhousecodexcoding-agentcoding-agentscursorgenaigpu-monitoringllm-observabilityllmopsnvidia-smiobservabilityopen-sourceopenaiopentelemetry
[Bug]: fixed token value extraction while asynchronous calls (#421)
ijkbytes4c4eb6aeccca
diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.tomlindex cb29a695..73cad38f 100644--- a/sdk/python/pyproject.toml+++ b/sdk/python/pyproject.toml@@ -1,6 +1,6 @@[tool.poetry]name = "openlit"-version = "1.22.3"+version = "1.22.4"description = "OpenTelemetry-native Auto instrumentation library for monitoring LLM Applications and GPUs, facilitating the integration of observability into your GenAI-driven projects"authors = ["OpenLIT"]repository = "https://github.com/openlit/openlit/tree/main/openlit/python"diff --git a/sdk/python/src/openlit/instrumentation/langchain/langchain.py b/sdk/python/src/openlit/instrumentation/langchain/langchain.pyindex 6a35a250..6aaefc15 100644--- a/sdk/python/src/openlit/instrumentation/langchain/langchain.py+++ b/sdk/python/src/openlit/instrumentation/langchain/langchain.py@@ -619,8 +619,8 @@ def achat(gen_ai_endpoint, version, environment, application_name,response = await wrapped(*args, **kwargs)try:- input_tokens = response.response_metadata["prompt_eval_count"] or 0- output_tokens = response.response_metadata["eval_count"] or 0+ input_tokens = response.response_metadata.get("prompt_eval_count", 0)+ output_tokens = response.response_metadata.get("eval_count", 0)# Calculate cost of the operationcost = get_chat_model_cost(