The same question that gives you a clean, multi-file answer on gemini.google.com gives you a single-function hallucination inside the Gemini Code Assist plugin in VS Code or JetBrains. Or the inline completions stop firing entirely after a Cloud Code update. Or you switched the chat model in Settings to the newest Gemini and the next reply still says “I am Gemini 2.5” — which has been retired for months.
Code Assist runs on the same Gemini family as the web app, but the IDE plugin has its own model routing, its own project / workspace binding, its own context indexer, and its own auth refresh cycle. Any of those can drift out of sync. This article walks through the most common drift modes and how to resync.
Common causes
Ordered by hit rate, highest first.
1. Plugin version is months behind the model release
Google ships new Gemini snapshots roughly monthly, but the Code Assist plugin updates on a slower cadence — and the IDE marketplace caches old versions. A plugin from three minor versions ago can be pinned to a retired model name, with no UI hint that anything is wrong.
How to spot it: ask the chat “what model are you?” If it answers with a name that is no longer in the Vertex AI model catalog, your plugin is stale.
2. Wrong GCP project bound
Code Assist binds to a Google Cloud project for billing and quota. If you have multiple projects (personal experiment, work, client) and the plugin picked the wrong one on first launch, you may be on a project where the Code Assist API is disabled, or quota is exhausted, or the model list is restricted by an org policy.
How to spot it: open Command Palette → Cloud Code: Switch Project. If you see multiple projects and you are bound to one you did not intend, that is the issue. Quota errors in the Output panel under “Cloud Code” are another tell.
3. Context indexer is stuck or disabled
The local-codebase awareness depends on a background indexer that walks your workspace. If you opened a 5,000-file monorepo and the indexer never finished — or you have it disabled via privacy settings — the model has no project context and falls back to language-model-from-prompt-only answers.
How to spot it: ask “where is the function that handles login?” If it answers generically (“typically you would find it in auth.js”) instead of citing your actual file paths, the indexer is not running.
4. Auth token expired silently
The OAuth token can expire without a clear UI prompt. The plugin retries with the stale token, gets a 401, falls back to a smaller cached model or returns an empty reply. The chat window just looks slow or unresponsive.
How to spot it: Output panel shows 401 or UNAUTHENTICATED. Or the inline ghost-text suggestions stopped firing entirely a few hours into a session.
5. Wrong model selected in plugin settings
The plugin Settings has a “Model” dropdown that is separate from the web app’s model picker. If someone (or a settings sync) set this to a smaller / faster variant, you will get a noticeably worse model than the web default.
How to spot it: open Settings → search “Gemini Code Assist model.” If it is set to a Lite / Flash variant and you expected Pro, fix that.
6. Region / data residency restriction
Workspace and Cloud accounts can be subject to data residency policies (EU, Japan, India). If your account is restricted to a region where the latest Gemini snapshot has not rolled out yet, the plugin routes to an older snapshot in that region and there is no visible warning.
How to spot it: same plugin version on a colleague’s non-restricted account behaves better. Check your Admin Console / Cloud org policies for region pins.
7. Local proxy or VPN strips streaming
Corporate proxies and some VPNs interfere with the streaming protocol. The plugin appears to “freeze” mid-response, then prints a partial answer when the buffer flushes. Looks like a model problem but it is a network one.
How to spot it: same query on a tethered phone hotspot streams smoothly. Output panel may show timeouts or connection reset.
Shortest path to fix
Step 1: Update the plugin and the IDE
In VS Code: Extensions → Gemini Code Assist → check for updates, then Reload Window. In JetBrains: Settings → Plugins → Updates. Also update the IDE itself — Code Assist sometimes pins a minimum IDE version.
After update, restart the IDE fully (not just reload the window) to clear in-memory model caches.
Step 2: Verify the bound project and API enablement
Run Command Palette → Cloud Code: Switch Project. Pick the project you intend. Then in the Google Cloud Console, confirm:
APIs and Services → Enabled APIs
- cloudaicompanion.googleapis.com (Code Assist)
- aiplatform.googleapis.com (Vertex AI)
If either is missing, enable it and wait ~5 minutes for IAM to propagate.
Step 3: Force a re-auth
VS Code: Command Palette → Cloud Code: Sign Out, then Cloud Code: Sign In. JetBrains: Tools → Google Cloud Code → Sign out, then sign in.
Re-auth refreshes both the OAuth token and the model routing handshake, which fixes a surprising number of “everything feels off” reports.
Step 4: Reset the local index
Command Palette → Cloud Code: Reset Local Index
For very large monorepos, add a .aiexclude file at the repo root listing directories to skip:
node_modules/
dist/
build/
.git/
vendor/
Index size of a few thousand files indexes in minutes; tens of thousands without exclusions can take hours and may silently give up.
Step 5: Explicitly set the chat model
Settings → search “Gemini Code Assist: Chat Model” → set to the newest Pro snapshot listed. Do the same for the completions model if your version exposes that setting separately.
Step 6: Test bare-minimum behavior
After resync, run two quick probes:
- Model probe: ask the chat “what is your exact model identifier?” Confirm it matches what Settings says.
- Context probe: ask “list the top-level directories in this workspace.” If it answers correctly, the indexer is healthy.
Step 7: If region-pinned, escalate to admin
If your org has a data-residency policy locking you to a region behind the latest snapshot, Code Assist behavior is out of your hands. File a ticket with your Workspace / GCP admin requesting either a region change or an exception, depending on policy.
When this is not on you
Google occasionally A/B routes Code Assist users to different model variants for capacity reasons, especially during a new-snapshot rollout. If quality fluctuates day-to-day with no changes on your end, you are seeing routing variance. It usually settles within a week of a major release.
Plugin marketplace caching is also outside your control — sometimes the VS Code marketplace serves a slightly stale copy of the plugin for a few days after release.
Easy to misdiagnose as
Concluding that “Gemini is bad at code.” The same model accessed via gemini.google.com, Vertex AI Studio, or the API directly often performs noticeably better — which means the bottleneck is the IDE integration layer, not model capability. If you can reproduce a failure on the web but not in the plugin (or vice versa), focus the investigation on whichever side fails.
Also easy to confuse Code Assist with the older AI Studio extension or with third-party Gemini IDE plugins. Make sure you are actually using the official Cloud Code / Gemini Code Assist extension before troubleshooting.
Prevention
- Set the plugin to auto-update; recheck the version monthly when Google ships a model snapshot.
- Pin a single GCP project for Code Assist and document which one across the team.
- Maintain a
.aiexcludefile so the indexer does not choke onnode_modulesor build artifacts. - After any IDE major-version upgrade, fully restart and re-sign-in once.
- Keep one bookmark to the Vertex AI model catalog so you can cross-check the current model names.
- Note your org’s region policy so unexpected regressions can be quickly attributed to it.
FAQ
- Why does the web app feel smarter than the plugin even at the same model version? The web app gets longer effective context and sometimes earlier snapshot rollouts; the plugin is constrained by IDE message-size limits and a slower release train.
- Does signing out wipe my chat history? No, history is server-side and reappears after re-auth, but local index state may rebuild.
Related
- Gemini App and Web Give Different Answers
- Gemini Google Account Permission Errors
- Gemini Workspace Integration Issues
- Gemini Workspace Not Syncing
- Gemini Extensions (Workspace, Maps, YouTube) Not Triggering
- Gemini Context Too Short
- Gemini Large Context (1M) Truncated
- Gemini 2.5 Output Truncated
- Gemini Thinking Mode Stops Early
- Gemini Quota Exceeded
- Gemini Not Responding
Tags: #Gemini #Troubleshooting #google-ai #code-assist #ide #vscode #jetbrains