langchain-ai/langchain

Add Perplexity cost tracking

Open

#31,647 建立於 2025年4月14日

在 GitHub 查看
 (6 留言) (1 反應) (1 負責人)Python (136,758 star) (22,617 fork)batch import
externalhelp wantedintegrationinvestigateperplexity

描述

Issue you'd like to raise.

costs shown on langsmith for perplexity API calls are inaccurate (even upto an order of magnitude). refer to their docs for how to calculate costs: https://docs.perplexity.ai/guides/models/sonar-reasoning-pro#detailed-pricing-breakdown-for-sonar-reasoning-pro

The problem is that pplx cost depends not only on input and output tokens but also on search queries and

Suggestion:

either add support for calculating this within langsmith platform or let users update the true cost while tracing an LLM call.

貢獻者指南