Why is tokens not being tracked in langsmith

When using LangSmith to track my create_agent, I’ve noticed that the token count now shows as zero. It used to track tokens correctly before — why is it no longer doing so?

Can you share a snippet of code on how you’re defining the LLM? Also, can you check in Settings>Model Pricing if your model name is defined there and matches the one in the trace?

I’m not sure if this is your issue, but I had to enable stream_usage on the LLM I was passing to my graph because my graph is streaming its output.

@marco

llm = ChatGoogleGenerativeAI(model=model_name, google_api_key=api_key )
agent_node = create_agent(
            model=llm,
            prompt=system_prompt,
            tools=tools,
            debug=True,
            name="react_new_agent"
        )

This is how I’m enabling the LLM — I used to be able to track its usage, but I’m not sure why it’s not working now.
langchain_google_genai == 2.1.12 , this the version of package i am using.

@aerickson-clt which is your package version? I am still not able to track even after providing stream_uasage=True

@marco
i am using model as gemini 2.5 flash and it is present in the settings>models

can you also tell me what is the use of Clone