Tracking Tokens Across Multiple Auto-Invoked Function Calls #12475
jaredlhamilton
started this conversation in
Ideas
Replies: 1 comment
-
Adding @markwallace-microsoft for help. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
As a developer, I need to track token usage. This includes token usage across multiple auto-invoked function calls (streaming and non-streaming).
Current Behavior
When using ToolCallBehavior.AutoInvokeKernelFunctions, only the final response's token usage is accessible via InnerContent:
Problem
Auto-invoked functions make multiple API calls internally, each consuming tokens. Currently, there's no way to access the intermediate token usage.
Expected Behavior
Token usage should be aggregated across all auto-invoked function calls and made available in the final response. This should work for both:
Impact
Without accurate token tracking, developers cannot:
Related discussion: #10322
Beta Was this translation helpful? Give feedback.
All reactions