Skip to content

cc-switch login and auth config cannot be entered or deleted

Quick fix

Upgrade to v3.17.0 or newer: the Google OAuth misdetection and the legacy-provider gating that hid the API key field are both fixed.

Error output
新建供应商,填写好apikey等信息,保存返回,再次点击进入, Api key那一栏消失了,是整个输入框都没了,没有填写api key的地方,点击保存就提示请输入api key
English translation

I created a provider, filled in the apikey and other details, saved and went back; clicking in again, the Api key row is gone — the whole input box is missing with nowhere to enter an api key, and clicking save says please enter an api key

This cluster holds several login and auth problems, but the core fixable one is the API key field disappearing or being uneditable in cc-switch. Maintainers confirmed two root causes. First, when a provider is named "Google" or starts with "Google ", a Gemini provider is misdetected as Google official OAuth mode; enabling it clears the saved environment variables in ~/.gemini/.env (the API key included), and switching provider writes the cleared state back to the database, so the API key field is gone on the next edit. Fixed in v3.14.0. Second, providers imported historically or created by hand with no category set have the API key field hidden entirely on edit because of a gating logic error. Fixed in v3.17.0. Other related but different scenarios: the installer build not starting on Windows Server 2025, leaving only the portable build, possibly related to Windows Installer policy or the signature/system environment; Claude Code not showing the official login after installing Personal_AI_Infrastructure, which needs use custom API key set to true in Claude Code /config; and a Gemini config that cannot be deleted because the app forbids deleting the only provider — add an official provider first, then switch.

  1. If the problem is the API key field disappearing or being uneditable, upgrade cc-switch to v3.17.0 or newer.

  2. If a provider is named "Google" or starts with "Google ", avoid it being misdetected as Google official OAuth. After upgrading, recreate or edit the provider and fill the API key in.

  3. If Claude Code does not show the official login after installing Personal_AI_Infrastructure, run /config in Claude Code, find the last item use custom API key, and set it to true.

  4. If a Gemini config cannot be deleted, add an official provider first and switch to it, then delete the old Gemini config.

  5. If the installer build will not start on Windows Server, use the portable build for now. You can also check the Windows Installer settings in local group policy, or use the CLI build.

Toolcc-switch
Version≤ 3.17.0
PlatformsmacOSWindows
Why does the API key field disappear after naming a provider Google?
The name is misdetected as Google official OAuth mode, so enabling it clears the environment variables in ~/.gemini/.env and writes that back to the database when switching provider. Fixed in v3.14.0.
Why is there no API key field when editing a provider I imported or created by hand?
A gating logic error in the edit screen showed the API key field only in specific creation scenarios. Fixed in v3.17.0, where providers that are not official or cloud-vendor-specific auth types show the field normally on edit.
Claude Code does not prompt for login after installing Personal_AI_Infrastructure. What now?
Run /config in Claude Code and set the last item, use custom API key, to true, to skip the official login and use a custom API.
Why can the Gemini config not be deleted?
With only one provider left, cc-switch refuses to delete it, since the app cannot work without one. Add an official provider and switch to it first, then delete the old config.
The installer build does not work on Windows Server 2025. What now?
Use the portable build for now. Some users solved it by changing the Windows Installer settings in local group policy, and maintainers also suggest trying cc-switch-cli.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.