Please select the area the issue is related to
Gateway Operator
Please select the aspect the issue is related to
Aspect/Monitoring (Metrics, observability, health checks, alerts)
Suggested Feature
The llm-cost policy has provider calculators for OpenAI, Anthropic, Gemini, Mistral and AWS Bedrock, but none for Azure. A request to an Azure OpenAI or Azure AI Foundry backend therefore resolves no calculator and records a cost of 0.
The effect is that any deployment fronting Azure models has no per-request cost. There is no spend attribution in analytics, and cost-based rate limiting cannot be used on those routes at all.
Azure also does not fit the assumptions the existing calculators make, so this needs its own policy rather than another branch of llm-cost. Azure prices by deployment rather than by model, and on several endpoints the response reports only the deployment name, which matches no pricing key. It keeps separate pricing catalogs for Azure OpenAI and Foundry models, varies rates by deployment type without reporting which one served the request, and returns token usage in several different shapes depending on the endpoint and model family.
What is needed is a cost policy for Azure OpenAI and Azure AI Foundry that prices requests from the token usage in the response and publishes the result the same way llm-cost does, so analytics and cost-based rate limiting work unchanged.
Related Issues
No response
Steps to Verify
Please select the area the issue is related to
Gateway Operator
Please select the aspect the issue is related to
Aspect/Monitoring (Metrics, observability, health checks, alerts)
Suggested Feature
The llm-cost policy has provider calculators for OpenAI, Anthropic, Gemini, Mistral and AWS Bedrock, but none for Azure. A request to an Azure OpenAI or Azure AI Foundry backend therefore resolves no calculator and records a cost of 0.
The effect is that any deployment fronting Azure models has no per-request cost. There is no spend attribution in analytics, and cost-based rate limiting cannot be used on those routes at all.
Azure also does not fit the assumptions the existing calculators make, so this needs its own policy rather than another branch of llm-cost. Azure prices by deployment rather than by model, and on several endpoints the response reports only the deployment name, which matches no pricing key. It keeps separate pricing catalogs for Azure OpenAI and Foundry models, varies rates by deployment type without reporting which one served the request, and returns token usage in several different shapes depending on the endpoint and model family.
What is needed is a cost policy for Azure OpenAI and Azure AI Foundry that prices requests from the token usage in the response and publishes the result the same way llm-cost does, so analytics and cost-based rate limiting work unchanged.
Related Issues
No response
Steps to Verify