Google config provider cannot be disconnected (optimistic update only) #8651

Open
opened 2026-02-16 18:10:30 -05:00 by yindo · 3 comments
Owner

Originally created by @Kamkmgamer on GitHub (Feb 5, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

When trying to disconnect the Google provider (type: config) from OpenCode via the web interface, the UI shows an optimistic update, but the provider is not actually removed.

Other providers (OpenAI, OpenRouter, Cerebras) disconnect correctly using the same disconnecting flow, so the issue appears to be specific to the Google config provider.


What happened?

  • Clicking Disconnect on the Google provider shows a success/optimistic UI update.
  • The provider remains connected after the action.
  • A toast appears saying “Google disconnected, Google models are no longer available”, but the provider still shows as connected in Settings → Providers.
  • Restarting OpenCode does not remove it.

What did you expect to happen?

  • The Google config provider should be fully removed after clicking Disconnect, the same way other providers are removed.

Plugins

opencode-antigravity-auth@beta

OpenCode version

1.1.53

Steps to reproduce

  1. Install and run OpenCode v1.1.53 on Windows.
  2. Install and configure opencode-antigravity-auth@beta.
  3. Add one or more Google accounts via the plugin.
  4. Open the web interface
  5. Go to Settings → Providers.
  6. Click Disconnect on the Google (config) provider.
  7. Observe that:
    • UI shows an optimistic success state.
    • Toast says Google is disconnected.
    • Provider still appears as connected.
  8. Try disconnecting other providers (OpenAI / OpenRouter / Cerebras), they are removed successfully.
  9. Restart OpenCode → Google provider is still present

Screenshot and/or share link

Video

Operating System

Windows (Windows 11)

Terminal

Windows PowerShell

Originally created by @Kamkmgamer on GitHub (Feb 5, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description When trying to disconnect the **Google** provider (type: `config`) from OpenCode via the web interface, the UI shows an optimistic update, but the provider is **not actually removed**. Other providers (OpenAI, OpenRouter, Cerebras) disconnect correctly using the same disconnecting flow, so the issue appears to be specific to the Google `config` provider. --- ### **What happened?** * Clicking **Disconnect** on the Google provider shows a success/optimistic UI update. * The provider remains connected after the action. * A toast appears saying *“Google disconnected, Google models are no longer available”*, but the provider still shows as connected in **Settings → Providers**. * Restarting OpenCode does not remove it. --- ### **What did you expect to happen?** * The Google `config` provider should be fully removed after clicking **Disconnect**, the same way other providers are removed. ### Plugins opencode-antigravity-auth@beta ### OpenCode version 1.1.53 ### Steps to reproduce 1. Install and run OpenCode v1.1.53 on Windows. 2. Install and configure opencode-antigravity-auth@beta. 3. Add one or more Google accounts via the plugin. 4. Open the web interface 5. Go to Settings → Providers. 6. Click Disconnect on the Google (config) provider. 7. Observe that: - UI shows an optimistic success state. - Toast says Google is disconnected. - Provider still appears as connected. 8. Try disconnecting other providers (OpenAI / OpenRouter / Cerebras), they are removed successfully. 9. Restart OpenCode → Google provider is still present ### Screenshot and/or share link [Video](https://hoy17gy8fx.ufs.sh/f/aEK1BQYVK3Nsu9Q7zxEEDGR2S1XgLVAxWZh0MsjOHnIe8PkK) ### Operating System Windows (Windows 11) ### Terminal Windows PowerShell
yindo added the windowsbugweb labels 2026-02-16 18:10:30 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 5, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #10494: Cannot disconnect from provider (affects Fireworks AI provider with same symptoms)
  • #7882: Archived session 'flashes back' due to SSE race condition (related root cause - optimistic UI updates contradicted by stale SSE events)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Feb 5, 2026): This issue might be a duplicate of existing issues. Please check: - #10494: Cannot disconnect from provider (affects Fireworks AI provider with same symptoms) - #7882: Archived session 'flashes back' due to SSE race condition (related root cause - optimistic UI updates contradicted by stale SSE events) Feel free to ignore if none of these address your specific case.
Author
Owner

@Kamkmgamer commented on GitHub (Feb 14, 2026):

I investigated further and found the root cause.

The issue was not purely UI-related — the Google provider wasn’t being removed because the models were still registered in:

~/.config/opencode/opencode.json

Since the models associated with the Google provider (installed via opencode-antigravity-auth@beta) were still present in the config file, the provider remained registered even after attempting to disconnect it.

Suggested improvement

If a provider is installed via a plugin and that plugin registers models, then when a user disconnects the provider, OpenCode should:

  • Remove the plugin
  • Remove all models associated with that provider
  • Clean up related entries in opencode.json

Otherwise, the system ends up in a partially-disconnected state where the UI reports success but the provider persists due to leftover models in config.

This would prevent stale configuration and make provider removal consistent with user expectations.

@Kamkmgamer commented on GitHub (Feb 14, 2026): I investigated further and found the root cause. The issue was not purely UI-related — the Google provider wasn’t being removed because the models were still registered in: ``` ~/.config/opencode/opencode.json ``` Since the models associated with the Google provider (installed via `opencode-antigravity-auth@beta`) were still present in the config file, the provider remained registered even after attempting to disconnect it. ### Suggested improvement If a provider is installed via a plugin and that plugin registers models, then when a user disconnects the provider, OpenCode should: * Remove the plugin * Remove all models associated with that provider * Clean up related entries in `opencode.json` Otherwise, the system ends up in a partially-disconnected state where the UI reports success but the provider persists due to leftover models in config. This would prevent stale configuration and make provider removal consistent with user expectations.
Author
Owner

@Optuber1 commented on GitHub (Feb 15, 2026):

I can confirm this issue affects more than just Google plugin providers. I have the same problem with:

  1. Google (connected via opencode-antigravity-auth plugin, then disconnected via CLI)
  2. OpenAI (attempted login via Desktop app but failed, yet still shows as "Config" connection)

My Setup

  • CLI shows correctly: Only OpenCode Zen api in opencode auth list
  • Desktop shows incorrectly: All 3 providers (OpenCode Zen, OpenAI, Google) as "Config" connections
  • Models from disconnected providers still appear in model selector
  • Selecting them causes errors: "OpenAI API key is missing", "Google Generative AI API key is missing"

Additional Context
The root cause you identified (models registered in ~/.config/opencode/opencode.json) seems to affect:

  • Plugin-based providers (Google via antigravity auth)
  • Built-in providers that were partially configured (OpenAI login attempted but failed)

Manually cleaning up the json by removing the plugin reference and the model list and restarting fixed the issue from both Opencode CLI and Desktop. Now it only shows the correctly connected providers and model list.

@Optuber1 commented on GitHub (Feb 15, 2026): I can confirm this issue affects more than just Google plugin providers. I have the same problem with: 1. Google (connected via opencode-antigravity-auth plugin, then disconnected via CLI) 2. OpenAI (attempted login via Desktop app but failed, yet still shows as "Config" connection) My Setup - CLI shows correctly: Only `OpenCode Zen api` in `opencode auth list` - Desktop shows incorrectly: All 3 providers (OpenCode Zen, OpenAI, Google) as "Config" connections - Models from disconnected providers still appear in model selector - Selecting them causes errors: "OpenAI API key is missing", "Google Generative AI API key is missing" Additional Context The root cause you identified (models registered in `~/.config/opencode/opencode.json`) seems to affect: - Plugin-based providers (Google via antigravity auth) - Built-in providers that were partially configured (OpenAI login attempted but failed) Manually cleaning up the json by removing the plugin reference and the model list and restarting fixed the issue from both Opencode CLI and Desktop. Now it only shows the correctly connected providers and model list.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8651