Overview
Gemini CLI is Google’s command-line AI assistant. By configuring Crazyrouter’s Gemini-native endpoint, you can use Gemini models that have been verified with real requests in Crazyrouter production.Configuration
Environment Variables
In the current Gemini CLI release, API-key mode still requiresGEMINI_API_KEY to be present explicitly. For Crazyrouter’s Gemini-native endpoint, set these three variables together:
~/.gemini/.env or your PowerShell profile.
Configuration File
Edit~/.gemini/settings.json:
- Do not leave the auth mode as
oauth-personal, or the CLI will continue trying Google sign-in. - Do not write
modelas a plain string in current versions; usemodel.name. - In some CLI paths,
settings.jsonalone is not enough. Headless mode may still require theGEMINI_API_KEYenvironment variable.
~/.gemini/.env Example
Launch
Recommended Model
| Model | Description |
|---|---|
gemini-3.1-pro-preview | Verified successfully with a real Gemini CLI request in Crazyrouter production on April 8, 2026, and recommended as the current baseline |
Crazyrouter supports both the Gemini native API format and the OpenAI-compatible format. Gemini CLI uses the Gemini-native format. The
gemini-3.1-pro-preview example above, the gemini-api-key auth mode, and GOOGLE_GEMINI_BASE_URL=https://crazyrouter.com have been validated with a real CLI request.