OpenAI service tier support
Problem
Currently, Codex CLI doesn't provide users with control over OpenAI API service tiers, limiting cost optimization options for different use cases.
Proposed Solution
Add service_tier configuration option to control API request cost and latency via OpenAI's service tier parameter:
auto(default): Standard processing with automatic tier selectionflex: 50% cheaper processing with increased latency, ideal for non-production workloadspriority: Faster processing for enterprise users
Implementation Details
- Configuration via
service_tierin config.toml and profiles - CLI flag
--service-tierfor per-session override - Model compatibility validation with fallback to
auto - Support for both exec and TUI modes
Use Cases
- Development/testing: Use
flextier for 50% cost savings on non-critical workloads - Production: Use
prioritytier for faster response times - Batch processing: Use
flexfor cost-effective background tasks
Configuration Examples
# Global setting
service_tier = "flex"
# Profile-specific
[profiles.cost-optimized]
model = "o3"
service_tier = "flex"
# CLI usage
codex --service-tier flex "Analyze this code"
codex exec --service-tier priority "Generate tests"
Benefits
- Cost optimization: Up to 50% savings with flex tier
- Performance control: Priority tier for time-sensitive work
- Flexibility: Per-session and per-profile configuration
- Backward compatibility: Auto tier maintains existing behavior
This feature aligns with OpenAI's service tier offerings and provides users with cost/performance control without breaking existing workflows.
I'd like to see this implemented, service_tier = priority would be nice for people who want lower latency responses, even if it costs more.
I support this. I tried codex cli for two days of work, not for production to learn and made great progress until it abruptly and rudely presented me with '🖐 You've hit your usage limit. Upgrade to Pro (https://openai.com/chatgpt/pricing) or try again in 4 days 1 hour 57 minutes." I am sure ya'll know what I mean. I am on the Plus plan, but a hobby developer. I wish we could instead 'auto switch' to a 'pay as you go' during the 'time-out' period, (happy to accept slower response) and then auto-switch back after 'time limit' resets. I know there is an option to use setx and your key, but that is a pain. make it easier to switch modes please.
+1 supporting this. Question, what's the current default service_tier set for ChatGPT Plus/Pro users?
Hi
Do we have any news about service_tier in Codex?
Ability to use GPT 5.1 high with priority service_tier would be awesome for our team
By default, it's very slow
@it-sha, thanks for your interest. We generally prioritize features based on community feedback. This has received some upvotes, but there are many features that are ahead of it in the priority list.
I was going to create an issue for this if did not exist. But turns out it does, +1 for this feature.