C.W.K.
Stream
Lesson 01 of 06 · published

The Gemini Model Family

~14 min · models, versioning, pricing-anchor

Level 0Spark
0 XP0/35 lessons0/10 achievements
0/140 XP to next level140 XP to go0% complete

The current Gemini lineup

Gemini moves fast. As of mid-2026, the stable, generally-available generation is Gemini 2.5, the preview generation is Gemini 3.x, and Gemini 2.0 is marked for deprecation. If you read a tutorial that says gemini-pro or gemini-1.5-flash, that's the legacy SDK from before late 2025. Treat anything older than the 2.5 generation as historical.

The three GA model IDs you actually ship against:

  • gemini-2.5-pro — complex reasoning, coding, long context. 1M token window, ~64K max output.
  • gemini-2.5-flash — hybrid reasoning model, default for most production traffic. 1M context.
  • gemini-2.5-flash-lite — smallest and cheapest. 1M context, ~8K max output. Use it for high-volume simple tasks.

Preview surfaces (gate behind a flag, never depend on for SLAs):

  • gemini-3.1-pro-preview — the most intelligent model, agentic workloads.
  • gemini-3-flash-preview — frontier with search/grounding.
  • gemini-3-pro-image-preview — native image generation (this is what cwkPippa's image-gen skill calls when Dad says "use Nano Banana Pro").

Versioning patterns

Google ships four kinds of model identifiers and they behave differently in production:

  • Stable — the version pinned to a date or generation (gemini-2.5-flash). Shape is locked; safe to put in tests and contracts.
  • Preview — explicitly marked, may change without notice. Useful for evaluation, dangerous for SLAs.
  • Latest aliases — auto-updated to the newest version of a family. Convenient, but a silent change can break parsing.
  • Experimental — short-lived, unsupported, not for production.

Context window = total token budget. The 1M window is the sum of system instructions, prior turns, attachments, your latest prompt, and the model's reply. Long outputs eat into the same pool, which is why a chat with 800K tokens of history will refuse to generate a 300K-token answer.

Code

Model selection rule of thumb·python
MODEL_POLICY = {
    'default': 'gemini-2.5-flash',           # most production traffic
    'cheap_bulk': 'gemini-2.5-flash-lite',   # 12.5x cheaper than Pro
    'reasoning': 'gemini-2.5-pro',           # complex coding, math, long context
    'preview': 'gemini-3.1-pro-preview',     # behind a feature flag only
    'image_gen': 'gemini-3-pro-image-preview',
}

def pick_model(needs_reasoning: bool, ctx_tokens: int, behind_flag: bool = False) -> str:
    if behind_flag:
        return MODEL_POLICY['preview']
    if needs_reasoning or ctx_tokens > 200_000:
        return MODEL_POLICY['reasoning']
    if ctx_tokens < 50_000:
        return MODEL_POLICY['cheap_bulk']
    return MODEL_POLICY['default']
What NOT to ship·python
# ❌ Legacy. EOL November 2025.
import google.generativeai as genai
genai.configure(api_key='KEY')
model = genai.GenerativeModel('gemini-pro')

# ❌ Don't depend on -latest aliases in tests or contracts.
model = 'gemini-2.5-flash-latest'

# ✅ Pin to the family ID; let the model card be your contract.
model = 'gemini-2.5-flash'

External links

Exercise

Write a one-page "Gemini model policy" doc for an imaginary product team. Include: (1) which model ID is the default for each surface (chat, batch summarization, image gen), (2) which preview models you allow behind a flag and which you ban, (3) the rule that decides when to escalate from Flash to Pro. Keep it short enough that an on-call engineer can read it in 30 seconds and pick the right model.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.