At least for langchain: https://python.langchain.com/docs/modules/model_io/models/llms/token_usage_tracking