# Agents: setting the OpenAI service tier (Flex) in the agent config and the advanced panel

**URL:** <https://community.n8n.io/t/agents-setting-the-openai-service-tier-flex-in-the-agent-config-and-the-advanced-panel/328474>\
**Category:** Feature Requests\
**Created:** [13. November 2026 um 09:48 UTC](https://community.n8n.io/t/agents-setting-the-openai-service-tier-flex-in-the-agent-config-and-the-advanced-panel/328474 "2026-11-13T09:48:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CSchulz](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/cschulz/32/163965_2.png) [@CSchulz](https://community.n8n.io/u/CSchulz)\
**Post date:** [13. November 2026 um 09:48 UTC](https://community.n8n.io/t/agents-setting-the-openai-service-tier-flex-in-the-agent-config-and-the-advanced-panel/328474/1 "2026-11-13T09:48:04Z")

</div>

## The idea is:

Let users choose the OpenAI service tier of an agent (default, flex, priority):

- as config.serviceTier in the agent JSON config, passed to OpenAI models as providerOptions.openai.serviceTier (other providers ignore it), and
- as a “Service tier” select in the Advanced panel, shown only for models whose provider supports it (same pattern as the cache duration for Anthropic). default removes the key from the config.

A second, small change: when OpenAI rejects a Flex request because it has no free capacity (flex\_unavailable, not billed), the agent waits briefly and re-issues the turn (up to 10 times, 1 s doubling to 30 s) instead of ending the run with an error. The rejection arrives as an error event inside a 200 stream, so neither the AI SDK retry nor the existing stall retry catches it.

## My use case:

I run the n8n Agent (Preview) for research: long tool loops, 5 to 8 million prompt tokens per run, model gpt-6.1-sol. Runs are not time critical. I measured the cost with one API key per run in the OpenAI console: 0.41, 0.62 and 0.46 USD per run with Flex, against about 0.89 and 1.37 USD with the standard tier, with the same output quality. Flex runs take about twice as long.

Today I can only set the tier by patching n8n locally, because the config schema drops unknown keys and the panel has no field. Flex requests are also rejected from time to time (in my tests 1 of 5 requests with gpt-6.1-sol and 2 of 5 with gpt-6-luna), and one rejection ended a run that had already used several minutes.

## I think it would be beneficial to add this because:

Flex about halves the token price for work that does not need an immediate answer: research, drafts, evaluations. The SDK already accepts providerOptions.openai.serviceTier per call, only the agent product has no way to set it. Without the retry, Flex is hard to use for long runs, because a single rejection stops them.

## Any resources to support this?

- OpenAI documentation for Flex processing: [Flex processing | OpenAI API](https://developers.openai.com/api/docs/guides/flex-processing)
- PR with the setting and the select: [feat(core): Add service tier setting to the agent config by CSchulz · Pull Request #43779 · n8n-io/n8n · GitHub](https://github.com/n8n-io/n8n/pull/43779) (screenshots of the panel are in the description)
- The retry change is a separate small PR, opened after this topic (link follows).

Questions for the team:

1. Is config.serviceTier the right place? I kept it out of config.promptCaching, which is deliberately small and strips an openai sub-config.
2. Should the field be provider-neutral (Anthropic also has a service tier) or OpenAI only for now?
3. When the user switches the model to another provider, should the stored serviceTier be removed (as promptCaching is normalized today) or is an ignored value fine?

## Are you willing to work on this?

Yes. The setting and the select are already in PR [#43779](https://github.com/n8n-io/n8n/pull/43779), the retry is prepared as a second PR, and I am happy to change the naming or the place of the setting after your feedback.
