Connect Gemini CLI to Tokatlas
Integration prerequisite
This is a conditional setup guide. First confirm a native Gemini generateContent endpoint and model available to your Tokatlas account. An Interactions-only route cannot be used directly by Gemini CLI. Proceed after confirming those details.
Before You Start
Install with npm install -g @google/gemini-cli using the Node.js version required by the official installation guide.
Prepare a Tokatlas API key and a model enabled for your account. Replace all YOUR_... placeholders. Back up existing settings before merging changes.
Connection Settings
| Setting | Value |
|---|---|
| Provider name | Tokatlas |
| Protocol | Gemini generateContent |
| Endpoint | See the compatibility requirements below |
| API Key | YOUR_TOKATLAS_API_KEY |
| Model ID | YOUR_TOKATLAS_MODEL_ID |
Setup
- Confirm that your Tokatlas route exposes native Gemini
generateContentand streaming operations. The Interactions API alone is insufficient. - After obtaining the confirmed Gemini base URL, set the variables below and select API-key authentication in Gemini CLI.
- Use an enabled Gemini model and test a short request. Verify the request destination in gateway logs.
Configuration Example
export GEMINI_API_KEY="YOUR_TOKATLAS_API_KEY"
export GOOGLE_GEMINI_BASE_URL="https://YOUR_CONFIRMED_GEMINI_GATEWAY_BASE"
geminiCompatibility Notes
Tokatlas native Gemini CLI compatibility is not established by the current repository. Do not substitute /v1beta/interactions for the base URL or assume Chat Completions is interchangeable. The override applies to Gemini API-key authentication, not Google account or Vertex authentication. In PowerShell use $env:NAME = "value".
Verify and Troubleshoot
- Open a new conversation and send “Reply with OK only”; check that text returns.
- Check Tokatlas usage for a successful request at the same time with the configured model.
- If you need tools, ask the client to list files in a test directory and check that the tool result returns to the conversation.
- If step 1 fails, test the key and model directly using API Basics. If that succeeds, troubleshoot client settings below.
| Problem | Check |
|---|---|
401 / 403 | Re-enter the Tokatlas key without quotes or spaces; check the auth mode and model access. |
404 | Compare the full request URL with the table above; remove a duplicated /v1 or endpoint suffix. |
| Unknown model | Copy an enabled ID from the model list, save it, and select that model in a new chat. |
| Tool failure | Model capabilities and client protocol support. |
| Changes ignored | Select the Tokatlas provider/profile, fully quit the client, and reopen it. |
