发布

  • [OPIK-5723] [SCRIPTS] feat: surface Gemma 4 + clean dead Gemma in Gemini sync (#6701)

    frostbyte_neo 发布于 2026-05-14 11:34:30 +00:00

    Updates scripts/sync_provider_models.py so the daily provider-sync
    workflow exposes Gemma chat models on the Gemini provider going forward.

    Generated artifacts (Java enum, TS types, dropdown YAML, llm-models YAML)
    are intentionally NOT in this PR — the daily cron will produce them on
    the next scheduled run and upload them to the CDN through the existing
    workflow path.

    Script changes

    • Drop ^gemma and ^gemini-gemma from GEMINI_EXCLUDE_PATTERNS so
      Gemma models surfaced by generativelanguage.googleapis.com/v1beta/models
      are no longer filtered out. Verified live: the Gemini API today exposes
      gemma-4-31b-it and gemma-4-26b-a4b-it with generateContent
      support. Gemma 2 / Gemma 3 were retired by Google in April 2026.
    • Add -tts, ^gemma-(2|3)-, and ^gemini-gemma- to
      GEMINI_DROPDOWN_EXCLUDE. Keeps gemini-3.1-flash-tts-preview out of
      the picker, and hides the dead Gemma 2 / 3 IDs that still ship in the
      LiteLLM prices JSON (their gemini/ route returns 404 from Google).
      Models stay in the backend enum so older traces can still resolve.
    • Extend _gemini_sort_key with a family tier (Gemini=0, Gemma=1) so
      Gemma sorts after Gemini in the dropdown, ordered by generation desc
      and parameter size asc, with *n variants after their base.
    • Collapse the legacy gemini-gemma- label prefix to gemma- in
      generate_gemini_label so any future Gemma row reads "Gemma N …" not
      "Gemini Gemma N …".

    Implements OPIK-5723: add Gemma models to Gemini provider.

    下载附件