Repository navigation
fix(ai): gemini default model is dead for new API keys - #171
Merged
Merged
Conversation
Live-checking ai.runSummary with a real Gemini key (per #168 follow-up) found the default gemini-2.5-flash returns HTTP 404 "no longer available to new users" — every ai.provider: gemini config without an explicit ai.model is broken out of the box. Switch the default to gemini-3.8-flash, confirmed against the real API (prompt -> HTTP call -> response parse all verified end-to-end, including a realistic run-summary prompt). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Pinned Gemini model names get retired (gemini-2.5-flash already was); the -latest alias does not. Confirmed against the real Gemini API. Adds a test pinning the default endpoint. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ai.runSummaryagainst a real Gemini key (the one thing feat(ai): opt-in AI run summary on the HTML dashboard #168 left unverified) and found the default model,gemini-2.5-flash, returns HTTP 404 — Google retired it for new API keys, pointing callers atgemini-3.8-flashinstead.ai.provider: geminiconfig that doesn't set an explicitai.modelis broken out of the box today. Switched the default and the docs table togemini-3.8-flash.Verification
curldirectly against the Gemini endpoint:gemini-2.5-flash→ 404 before,gemini-3.8-flash→ 200 after.AiRunSummarizer.buildPrompt→AiFailureAnalyzer.callApi→ response parsing) against the real API with a realistic two-failure run summary prompt — returned a correct plain-English summary.ai.timeoutSecondswith Gemini: observed latency for this model was highly variable in testing (as low as ~5s, as high as ~95s for the same prompt), driven by the model's internal "thinking" tokens. The defaultai.timeoutSeconds: 20may be too tight for Gemini in practice — not changed here since it's a latency/cost tradeoff for the user to tune, not a correctness bug, but worth knowing.mvn test: 740/740 green.Test plan
mvn testpassesAiRunSummarizerprompt-building andAiFailureAnalyzerHTTP/parsing code🤖 Generated with Claude Code