Tracing Cost of LLM Tool

I am using the following code for tracing.
It shows the trace in the langsmith UI but it doesnt show the token usage, not the cost - how to fix that.

@traceable(run_type="llm", name='daniel1', metadata={"ls_provider": "openai", "ls_model_name": "gpt-4.1-2025-04-14"})
def sample_tool()

Any help?

Hey @daniel! Seems like this will be resolved if you try wrapping your client using wrap_openai. You can check this guide here:

Once done, you can use this model pricing table to calculate token cost as well!