An Azure service that provides a hybrid, multi-cloud management platform for APIs.
Hello Bakker, J. (Jeffrey),
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that your Login ModelNames in API mangement for Background requests is having isue.
This issue fix is only by correlating the background POST and GET. The model name cannot be reliably added from the GET response because llm-emit-token-metric runs in inbound policy. Use an external Redis-compatible cache or durable correlation store, store response_id > model during the POST, retrieve it during the GET, and pass it as the ModelName dimension. Avoid adding response_id permanently as a metric dimension because it is high-cardinality and can hit Azure Monitor custom metric limits.
Use the below resource links for more reading and implementation steps:
- Azure API Management
llm-emit-token-metricpolicy - Azure API Management
cache-store-valuepolicy - Azure API Management
cache-lookup-valuepolicy - Azure API Management policy expressions
- Integrate Azure API Management with Application Insights
Please do not close the thread by upvoting and accepting the answer if any part of it is helpful.