Does azure-openai-emit-token-metric policy at API Management Service support cached tokens?

SS 5 Reputation points
2025-02-20T02:30:06.6733333+00:00

The Azure API Management Service recently updated the azure-openai-emit-token-metric to support the GPT-4o model.

Does this policy support the recording of Cached Tokens? According to the official documentation on MS Learn, it appears that this feature is not supported.

https://learn.microsoft.com/en-us/azure/api-management/azure-openai-emit-token-metric-policy

Token count metrics include: Total Tokens, Prompt Tokens, and Completion Tokens.

However, I’m unsure if this is due to the documentation not being updated or if the feature is indeed not supported at all.


Feel free to ask if you need any further assistance!

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,457 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VenkateshDodda-MSFT 25,111 Reputation points Microsoft Employee Moderator
    2025-03-18T15:44:38.8166667+00:00

    @SS Thanks for your patience on this. I have checked with the engineering team and sharing the below.

    Currently creating policy to measure cache token as custom metric in application insights is not supported. Team has confirmed that this feature is in their product roadmap, and we don't have any exact ETA can be shared.

    I would suggest you follow the What's new in apim here or Azure updates.

    Hope this helps let me know if you have any further questions on this.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.