fix(app): use the GA gemini-3.1-flash-lite slug#3504
Merged
Conversation
`google/gemini-3.1-flash-lite-preview` no longer exists: the AI Gateway retires `-preview` aliases when a model goes GA. Two paths referenced it. rerank-suggestions.ts calls the gateway directly for risk/vendor -> task auto-link reranking. Both callers in run-linkage.ts catch the 404 and fall back to raw cosine, so the breakage was silent — suggestions quietly regressed to the pre-reranker precision this module exists to fix. Added a regression test asserting the requested slug is GA, not a preview alias. The automation chat `modelId` values are inert (the enterprise-api chat route hardcodes its own model and ignores the body field), but they are updated so the two repos do not disagree on which model is in use.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
🎉 This PR is included in version 3.108.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Companion to trycompai/comp-private#329, which carries the customer-facing fix.
Background
google/gemini-3.1-flash-lite-previewno longer exists — the AI Gateway retires-previewaliases when a model goes GA. Verified against the live catalog:Two paths in this repo referenced it.
1. Auto-link reranking — a real, silent regression
apps/app/src/lib/rerank-suggestions.tscalls the gateway directly for risk/vendor → task auto-link suggestions. Both callers inrun-linkage.ts(rerankAndBuildScoreMap,rerankForAutonomousPersist) catch the failure and fall back to raw cosine similarity.So nothing errored and nothing was logged to the user — auto-link suggestions have just been running at pre-reranker precision, which is the exact problem this module was added to solve (cosine scores collapse into a 0.61–0.64 band for short compliance prose, so on-target tasks and keyword coincidences rank identically).
Added a regression test asserting the requested slug is GA and not a
-previewalias. Confirmed it fails against the old value:2. Automation chat
modelId— inert, updated for consistencyuse-chat-handlers.ts(×3) andworkflow-visualizer-simple.tsx(×1) sendmodelIdin the request body, but the enterprise-api chat route hardcodes its own model and ignores the field. Updating them changes no behavior; it just stops the two repos disagreeing about which model is in use.Verification
tsc --noEmitclean on all changed files;eslintclean.Summary by cubic
Switch all references to the GA model
google/gemini-3.1-flash-liteto fix silent reranking failures caused by the retired-previewalias. Also align inert chatmodelIdfields to the same GA slug for consistency.google/gemini-3.1-flash-liteto stop 404s and restore auto-link suggestion quality.-preview), and update chatmodelIdfields to the GA slug (no behavior change).Written for commit ec646ed. Summary will update on new commits.