Setup guide

Provider setup guide

Browse setup steps and troubleshooting by tool.

Provider setup guide/CC-Switch Gemini

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.

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 confirmHow to viewWhy
Gemini CLI can now startFirst, confirm that the Gemini CLI can be opened on this machineCC Switch is only responsible for configuration switching
The provider supports GeminiThere are entries related to Gemini / Google / Vertex in the backend or tutorialsOpenAI compatible interface is not the same as the Gemini interface
Key type is correctConfirm that the Key corresponds to Gemini or VertexAn incorrect Key type will cause authentication to fail
The model name comes from the Gemini listCopy the Gemini model name from the provider's backendDo not mix Claude or OpenAI model names

How to fill in the fields

SettingFilling MethodAttention Beginners
Provider NameClearly specify the purposeFor example, 'Gemini provider' or 'Google Gemini'
Target Tool / PresetSelect Gemini or Google / Vertex related presetsDo not select OpenAI compatible presets
Base URLCopy the interface address corresponding to GeminiIf the backend only provides an OpenAI address, do not forcibly fill it in yet
API KeyCopy the Key corresponding to Gemini / VertexThe Key type must correspond to the Base URL
Model NameCopy the Gemini model listModel names are usually different from OpenAI and Claude

Apply to Gemini

  1. Open CC Switch and go to the Provider management area.
  2. Add a new Gemini Provider, or select an already configured Gemini Provider.
  3. Choose Gemini CLI related presets as the target tool.
  4. Fill in the corresponding Base URL, API Key, and model name for Gemini.
  5. After saving, execute Apply / Switch.
  6. 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.