Skip to content

fix(openai): add "fast" to the responses ServiceTier literal - #7044

Open
philipp-eisen wants to merge 1 commit into
livekit:mainfrom
telli-ai:phil/openai-fast-service-tier
Open

fix(openai): add "fast" to the responses ServiceTier literal#7044
philipp-eisen wants to merge 1 commit into
livekit:mainfrom
telli-ai:phil/openai-fast-service-tier

Conversation

@philipp-eisen

Copy link
Copy Markdown
Contributor

OpenAI renamed "Priority processing" to "Fast mode" on 2026-07-30 and changed the accepted service_tier values (docs, FAQ). fast and priority are aliases for the same tier: a request with service_tier="fast" succeeds, and the response still reports service_tier="priority".

The ServiceTier literal in the responses LLM predates the rename, so passing service_tier="fast" needs a cast today. This PR adds "fast" to the literal, in the same member order as the openai SDK's own type (checked on openai 2.53.0: Literal["auto", "default", "flex", "scale", "priority", "fast"]).

Note that the API no longer accepts "scale". Requesting it on chat completions fails (verified against the live API on 2026-08-30):

Error code: 400 - {'error': {'message': "Invalid value: 'scale'. Supported values are: 'auto', 'default', 'fast', 'flex', and 'priority'.", 'type': 'invalid_request_error', 'param': 'service_tier', 'code': 'invalid_value'}}

So the API currently accepts auto, default, fast, flex, priority. I kept "scale" in the literal so existing type-checked callers don't break; whether to deprecate or remove it is up to you.

For awareness, two related spots left untouched: the chat-completions path types service_tier as plain str, and livekit-agents/livekit/agents/inference/llm.py has the same pre-rename literal for the LiveKit inference gateway, which defines its own accepted set.

OpenAI renamed "Priority processing" to "Fast mode" on 2026-07-30;
"fast" and "priority" are now aliases for the same tier. This matches
the openai SDK's own service_tier literal and lets callers pass
service_tier="fast" without a cast.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@philipp-eisen
philipp-eisen requested a review from a team as a code owner August 30, 2026 12:48

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant