CC-Switch Gemini
This page talks about applying Gemini-related Providers to the Gemini CLI through CC Switch. Gemini's interfaces and authentication methods are different from OpenAI-compatible interfaces, so you cannot just fill in the regular OpenAI Base URL and treat it as usable for Gemini.
Official information Downloads and documentation are subject to the official site.
What this page explains
It is only recommended to configure Gemini in CC Switch when the provider clearly provides Gemini / Google / Vertex related interfaces, or the documentation explicitly states support for Gemini CLI.
Confirmation before starting
| Things to confirm | How to view | Why |
|---|---|---|
| Gemini CLI can now start | First, confirm that the Gemini CLI can be opened on this machine | CC Switch is only responsible for configuration switching |
| The provider supports Gemini | There are entries related to Gemini / Google / Vertex in the backend or tutorials | OpenAI compatible interface is not the same as the Gemini interface |
| Key type is correct | Confirm that the Key corresponds to Gemini or Vertex | An incorrect Key type will cause authentication to fail |
| The model name comes from the Gemini list | Copy the Gemini model name from the provider's backend | Do not mix Claude or OpenAI model names |
How to fill in the fields
| Setting | Filling Method | Attention Beginners |
|---|---|---|
| Provider Name | Clearly specify the purpose | For example, 'Gemini provider' or 'Google Gemini' |
| Target Tool / Preset | Select Gemini or Google / Vertex related presets | Do not select OpenAI compatible presets |
| Base URL | Copy the interface address corresponding to Gemini | If the backend only provides an OpenAI address, do not forcibly fill it in yet |
| API Key | Copy the Key corresponding to Gemini / Vertex | The Key type must correspond to the Base URL |
| Model Name | Copy the Gemini model list | Model names are usually different from OpenAI and Claude |
Apply to Gemini
- Open CC Switch and go to the Provider management area.
- Add a new Gemini Provider, or select an already configured Gemini Provider.
- Choose Gemini CLI related presets as the target tool.
- Fill in the corresponding Base URL, API Key, and model name for Gemini.
- After saving, execute Apply / Switch.
- Reopen the terminal, and then perform a minimal test using Gemini CLI.
Test whether it works
The most common reasons for Gemini configuration failure are filling in an OpenAI compatible address in Gemini, or a Key type that does not match the interface address.
Gemini minimal test
gemini "Please reply only: CC-Switch Gemini is active" If Gemini CLI still requires Google login, first follow Gemini CLI's own prompts; CC Switch can only sync the configurations of Providers it supports and cannot bypass the login requirements of the target tool itself.
