Define + export `ServiceTiers` string literal

Open Beginner friendly
#3,556 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
api

Research direction

Search the Python library for the existing service_tier definitions and exported string-literal types. Define and export ServiceTiers so callers can use it for annotations, while keeping compatibility with SDK versions that support different service tiers; verify the relevant existing tests.

Written by the indexing model from the issue text.

Description

Confirm this is a feature request for the Python library and not the underlying OpenAI API.
  • This is a feature request for the Python library
Describe the feature or improvement you're requesting

If I want to annotate service_tier in my code, I have to hard-code a type like Literal["auto", "default", "flex", "scale", "priority", "fast"], and then the hard-coded type annotation breaks if I'm using anything other than the latest version of the sdk.

Additional context

No response

Dominant language
Python
Stars
31.7k
Forks
5.8k
Avg merge
1d 6h
Merged PRs (30d)
96

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/openai-python

All issues in openai/openai-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.