An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
Hello @Nagrath, Richa
Thank you for providing a detailed reproduction scenario.
Based on your observations, it does appear that the model response indicates a cache hit (prompt_tokens_details.cached_tokens), while the corresponding Azure Monitor cache metrics and Cost Management data don't appear to reflect that cached usage.
Before concluding that this is a billing issue, I'd recommend verifying a few points:
- Confirm that all three requests were truly identical (prompt, system prompt, parameters, deployment, API version, and any tools/functions), as prompt caching requires an exact cache match.
- Allow sufficient time for Azure Monitor and Cost Management to complete data ingestion. While token usage is typically available sooner, billing and cost analytics may be delayed.
- Compare the Usage or Consumption records after the reporting delay to determine whether cached input pricing has been applied, as Azure Monitor metrics and billing data are generated through different telemetry pipelines.
If, after the expected reporting window, you continue to observe:
- prompt_tokens_details.cached_tokens populated in the API response,
- no values for Prompt tokens read from cache in Azure Monitor, and
- billing that reflects the full prompt token count rather than the discounted cached input,
then this would warrant a support investigation. Please capture the following when opening a support request:
- Request IDs (x-ms-request-id or apim-request-id)
- Timestamps (UTC)
- Deployment name
- API version
- Model name
- Region
- A sample of the API responses showing cached_tokens
These details will help Microsoft correlate the inference telemetry with Azure Monitor and Cost Management records to determine whether the discrepancy is due to reporting latency or an issue in the telemetry or billing pipeline.
If you've already waited beyond the normal reporting delay and can consistently reproduce this behavior, it would be helpful to know whether you're seeing the same results when calling the Azure OpenAI endpoint directly (bypassing Azure API Management). That would help determine whether the issue is specific to the telemetry pipeline or unrelated to APIM.
Please "Accept the Answer" if this information helped you. This will help us and others in the community as well.