You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
llama_stack/distribution/routers/inference.py also seems to support creating Token metrics, returning them in response chunks and exporting them to configured telemetry.
However if we use an Agent to support use of Tools (RAG, MCP etc) the Token metrics from the Agent's use of the InferenceApi are dropped, lost, not propagated out in the response chunks.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Keeping track of LLM Token usage is important.
The
InferenceApi
'sInferenceProvider.completion
andInferenceProvider.chat_completion
both supportMetricResponseMixin
.llama_stack/distribution/routers/inference.py
also seems to support creating Token metrics, returning them in response chunks and exporting them to configured telemetry.All good so far.
However if we use an
Agent
to support use of Tools (RAG, MCP etc) the Token metrics from theAgent
's use of theInferenceApi
are dropped, lost, not propagated out in the response chunks.Is it reasonable to enhance
llama-stack
to return Token metrics when using anAgent
?Is there anything on a road-map to support it at a future date?
Perhaps I'm mistaken; so feel free to correct my understanding.
Beta Was this translation helpful? Give feedback.
All reactions