[Feature] Flex Processing pricing for OpenAI
What Would You Like to See with the Gateway?
Portkey Gateway should correctly detect OpenAI Flex processing requests [ref] and price them using Flex rates (50% discount, see OpenAI chart [ref]), so cost attribution matches OpenAI billing.
Requested behavior:
When an OpenAI Responses or Chat Completions request includes service_tier: "flex", Gateway should:
Tag the request as Flex tier in logs/metrics (if applicable).
Compute cost using OpenAI Flex pricing for that model (incl. cached input pricing where relevant).
When service_tier is omitted or set to auto, continue using the project default tier (typically Standard).
If OpenAI returns 429 Resource Unavailable for flex requests, cost attribution should be $0 (since OpenAI states no charge on this error).
Current behavior:
- Portkey does not seem to be aware of flex processing requests and associated discount
Context for your Request
My organization has started using Portkey recently to help with cost attribution and trace logging. We use flex processing for some non-time-sensitive requests, but it seems Portkey is not aware of the discounts here. This creates a 50% price discrepancy for some of our projects. Thank you!
Your Twitter/LinkedIn
Liam Toran
Source: Portkey-AI/gateway