Gemini CLI sends Google GenAI-style requests. Point its Gemini API base URL at ModRouter’s /genai integration.

Endpoint

Set MODROUTER_BASE_URL in the shell where Gemini CLI runs.

Setup

Configure the Gemini API base URL setting used by your Gemini CLI version. Common environment-based setup:
For Vertex-style usage, keep your normal Vertex configuration and point the GenAI base URL to ModRouter:

Models

Use native Gemini names or explicit ModRouter provider prefixes:
Non-Google models must support the tool-use patterns Gemini CLI needs for file operations and shell workflows.