#229·glass

AskService 404s when Google retires a pinned Gemini model

Author: justanotherkevinCreated Sep 8, 2026Updated Sep 8, 2026

What happens

[AskService] Error while processing stream: GoogleGenerativeAIFetchError: [404 Not Found] This model models/gemini-2.5-flash is no longer available to new users.

All Gemini LLM calls (Ask, Listen summaries) fail once Google retires the model. The same failure mode will recur on every future model retirement.

Root cause

The model id gemini-2.5-flash is hardcoded in three spots:

  • src/features/common/ai/factory.jsPROVIDERS.gemini.llmModels
  • src/features/common/ai/providers/gemini.jscreateLLM default param
  • src/features/common/ai/providers/gemini.jscreateStreamingLLM default param

The id ships inside the Electron binary, so users on an older build stay broken until they update, even though it is purely a string change.

Proposed fix

Switch to the gemini-flash-latest alias. Per the Gemini API docs it points to the current Flash release, is hot-swapped on each release, and carries a 2-week email notice before any breaking change to the model behind it.

Stale persisted selections (selected_llm_model = "gemini-2.5-flash" in provider_settings) self-heal on next launch: getProviderForModel stops resolving the old id, so modelStateService._autoSelectAvailableModels re-selects the new list entry.

Tradeoff

Google recommends pinned stable ids for production. -latest can resolve to a preview/experimental build, and for BYO-key users the 2-week deprecation email goes to them, not to the Glass team. This is an acceptable trade for a slow-releasing desktop app that otherwise needs a full binary release per model bump.

Follow-ups (not in the linked PR)

  • createSTT in gemini.js hardcodes model: 'gemini-live-2.5-flash-preview' and ignores the model passed via opts — the STT path will break the same way and the factory's sanitizeModelId plumbing is dead for it.
  • Consider a remote model manifest (Firebase) so the provider/model list is config, not code.