The model choice sets quality, speed and price for every call your app makes.
OpenAI offers several models at once, from very capable to very cheap. In October 2026 the model selection guide describes three main options:
- Astra (
gpt-6-astra): the most capable, for ambiguous problems and deep analysis. The docs use it in most examples. - Sol (for example
gpt-6.1-sol): strong on complex tasks while keeping time and cost in check. - Luna (for example
gpt-6-luna): the most cost-efficient, for well-scoped tasks, triage and frequent automations.
There are also specialised models for embeddings, images, speech and moderation, covered in later lessons.
These names and versions change every few months, and older ones are shut down on a published schedule. Several GPT-4 and GPT-5 era snapshots are being retired in 2026 and early 2027. Read the models page and the deprecations page before choosing, and keep the model id in configuration.
A practical method:
- Start with a capable model to see what good output looks like.
- Build a small set of test questions with expected answers.
- Try a cheaper model (and a lower reasoning effort, covered later) on the same set.
- Keep the lightest setting that still meets your quality bar.
client.models.list() shows which models your key can use, which helps catch typos and retired ids early.
Example
from openai import OpenAI
client = OpenAI()
available = sorted(m.id for m in client.models.list())
print([m for m in available if m.startswith("gpt-6")])
# e.g. ['gpt-6-astra', 'gpt-6-luna', 'gpt-6.1-sol', ...] (varies by date)
MODEL = "gpt-6-luna" # cheap default; switch per task after testing
assert MODEL in available, f"{MODEL} not available to this key"Remember
- Astra: most capable; Sol: balanced; Luna: cheapest (as of Oct 2026)
- Check the deprecations page; ids are retired on a schedule
- Pick the lightest model that passes your own tests
Watch out for
- Hard-coding an old id such as gpt-4o that is scheduled for shutdown.