Skip to content

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

Closed

Description

@Kamkmgamer

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

Activity

  1. github-actions commented on Feb 5, 2026

    @github-actions
    Contributor

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

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

  2. Kamkmgamer commented on Feb 14, 2026

    @Kamkmgamer
    ContributorAuthor

    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.

  3. Gb10091 commented on Feb 15, 2026

    @Gb10091

    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.

  4. github-actions commented on Apr 17, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwebRelates to opencode on web / desktopwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions