Skip to content

LLM registry: add GPT-5.4 / Gemini 3.1 / Claude 4.6, drop previews, prune soon-EOL models #308

Description

@mottych

Summary

Refresh MODEL_REGISTRY and provider allowlists for current frontier models, eliminate *-preview model IDs in favor of stable Vertex/OpenAI strings when available, and remove models scheduled to lose support within ~6 months (from implementation date).

1. Add OpenAI — GPT-5.4 (all variants)

Per OpenAI Models, the current flagship line includes gpt-5.4, gpt-5.4-mini, and gpt-5.4-nano (confirm any additional chat/variant IDs in docs at implementation time).

Code touchpoints

  • coaching/src/infrastructure/llm/openai_provider.py — extend SUPPORTED_MODELS; update models_without_temperature (or equivalent) if new IDs follow GPT-5.x rules.
  • coaching/src/core/llm_models.py — new SupportedModel entries with pricing/capabilities from current pricing page.
  • Unit tests under coaching/tests/unit/infrastructure/llm/ as needed.

2. Add Google Vertex — Gemini 3.1 (Pro / Flash / Flash-Lite)

Add stable model names for:

Migrate off preview: Today we use gemini-3.1-pro-preview for GEMINI_3_PRO in llm_models.py and google_vertex_provider.py. Replace with the non-preview ID once Google publishes stable aliases on Vertex, and update CACHE_SUPPORTED_MODELS_GEMINI if caching rules differ.

3. Add AWS Bedrock — Claude Sonnet 4.6 & Opus 4.6

  • Opus 4.6 is announced for Bedrock (e.g. base id pattern anthropic.claude-opus-4-6-v1:0verify exact ID and inference-profile requirements in AWS Bedrock Claude models / console for target regions).
  • Sonnet 4.6 — confirm Bedrock model ID and whether it uses the same inference-profile pattern as 4.5.

Code touchpoints

  • coaching/src/infrastructure/llm/bedrock_provider.pySUPPORTED_MODELS, INFERENCE_PROFILE_MODELS, CACHE_SUPPORTED_MODELS as applicable.
  • coaching/src/core/llm_models.py — new codes (e.g. CLAUDE_SONNET_4_6, CLAUDE_OPUS_4_6).

4. Remove all preview model IDs from this repo

Known today

  • GEMINI_3_PROmodel_name gemini-3.1-pro-preview (llm_models.py, GoogleVertexLLMProvider.SUPPORTED_MODELS).

Audit

  • Grep for preview in coaching/src/infrastructure/llm/, coaching/src/core/llm_models.py, and coaching/src/llm/ (e.g. legacy gpt-4-turbo-preview in coaching/src/llm/providers/openai.py).
  • Replace with stable IDs or remove dead paths.

5. Remove / retire models with support ending within ~6 months

Re-verify dates on vendor pages before merging; policy: drop from active registry (or set is_active=False + removal plan) if shutdown is on or before ~6 months from merge date.

Strong candidates (already public)

  • Gemini 2.0 Flash family — Google marks Gemini 2.0 Flash / 2.0 Flash-Lite as deprecated with migration away from 2.0; see Gemini models and deprecations. Our allowlist includes gemini-2.0-flash, gemini-2.0-flash-001, gemini-2.0-flash-lite in google_vertex_provider.pyremove or replace with 2.5 equivalents already in registry.
  • OpenAI — Check API deprecations for any remaining IDs we still expose (e.g. legacy gpt-4-turbo / snapshots). Remove or replace per official timeline if shutdown falls within the window.
  • Bedrock — Review Model lifecycle / model release notes for Claude 3 / legacy entries we still list (anthropic.claude-v2, claude-3-sonnet-20240229, etc.) and drop those with announced retirement ≤6 months.

6. Acceptance criteria

  • GPT-5.4 family registered and callable via LLMProviderFactory.
  • Gemini 3.1 Pro / Flash / Flash-Lite on Vertex with no preview suffix in production registry (unless Google only offers preview on Vertex — then document exception and gate behind explicit preview flag).
  • Sonnet 4.6 + Opus 4.6 on Bedrock with correct inference profile + caching metadata.
  • No preview model strings left in supported paths (audit complete).
  • 2.0 Flash variants removed or migrated; any other model removed has vendor doc link + date in PR description.
  • Tests updated; optional smoke call per provider in dev.

References


In progress (agent)

Approach: Update llm_models.py, openai_provider.py, google_vertex_provider.py, bedrock_provider.py, legacy coaching/src/llm/providers/* where needed; extend unit tests.

Extra (approved): When retiring models, scan for fallback/default/topic model references (Parameter Store docs, topic_seed_data, DynamoDB seed JSON, LLMTopic defaults/aliases) and remap to closest supported registry codes.

Validation: ruff, mypy, full pytest; document removed models + vendor deprecation links in PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions