fix(transcript): replace retired preview model; fall back on 404 as well#394
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
There was a problem hiding this comment.
Code Review
This pull request updates the TRANSCRIPT_MODELS configuration and enhances error handling in createTranscript by capturing the last error encountered during model iteration. The reviewer suggested safely converting errors to strings to prevent potential TypeError exceptions and recommended conditionally formatting the final error message to avoid displaying 'undefined' in edge cases where no error is captured.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Google retired gemini-3.1-flash-lite-preview, causing all video/audio transcript requests to fail with 404 since 2026-07-09. The fallback loop only continued on 429/RESOURCE_EXHAUSTED, so the second model (gemini-2.5-flash) was never tried and the AI response was written as ERROR. - Replace the retired preview model with GA gemini-3.1-flash-lite - Also try the next model on 404/NOT_FOUND (model retired or inaccessible), not just quota errors - Include the last error in the all-models-failed message instead of assuming quota limits Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
e2cdd94 to
e3660c9
Compare
|
@claude /code-review |

Problem
Google retired
gemini-3.1-flash-lite-previewon 2026-07-09 (~23:58 UTC). Since then, every video/audio transcript request received a 404 from Gemini:The model fallback loop in
createTranscriptonlycontinued to the next model on429+RESOURCE_EXHAUSTED; any other error was re-thrown. So the second model (gemini-2.5-flash) was never attempted, and the AI response was written asERROR. ~248 video/audio articles since then have no transcript. Image OCR (Vision API) was unaffected.Changes
gemini-3.1-flash-lite-preview→ GAgemini-3.1-flash-liteinTRANSCRIPT_MODELS.404/NOT_FOUND(model retired or inaccessible to the project), so a future preview-model retirement degrades gracefully instead of taking out all AV transcripts.All models failed due to quota limits.no longer assumes quota; it now includes the last error for easier diagnosis.🤖 Generated with Claude Code