Skip to main content

Google (Gemini)

Google provides the Gemini model family for text, vision, and reasoning. WednesdayAI supports two authentication paths: a GEMINI_API_KEY for direct API access, and the Google Gemini CLI OAuth flow for users who prefer browser-based sign-in.

Requirements

  • A Gemini API key from aistudio.google.com, or
  • A Google account with access to Gemini (for OAuth via google-gemini-cli)

Quickstart

API key

Google Gemini CLI OAuth

This opens a browser-based OAuth flow. Keep the terminal open until it completes. After either method, verify the setup:

Configuration

Environment variable

WednesdayAI reads GEMINI_API_KEY automatically and enables the google provider.

Config snippet

Provider settings

Available models

The google provider includes all current Gemini models. Key models: Use model IDs as google/<model-id> (example: google/gemini-2.5-pro).

Vertex AI

For enterprise Vertex AI access, use the google-vertex provider. This uses Application Default Credentials (ADC) via gcloud:
WednesdayAI resolves Vertex credentials via the ADC chain — no GEMINI_API_KEY is needed. The base URL is https://{location}-aiplatform.googleapis.com and uses the google-vertex API backend.

google-vertex config snippet

Available google-vertex models mirror most google models: gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-3-pro-preview, gemini-3-flash-preview, gemini-2.0-flash, gemini-2.0-flash-lite, gemini-1.5-pro, gemini-1.5-flash, gemini-1.5-flash-8b, gemini-3.1-pro-preview.

Troubleshooting

401 Unauthorized / API key not valid
  • Verify your API key starts with AIza and is copied in full.
  • Re-run onboarding: wednesdayai onboard --auth-choice gemini-api-key.
  • Ensure the Generative Language API is enabled in your Google Cloud project.
OAuth token refresh failed
  • Re-run wednesdayai onboard --auth-choice google-gemini-cli to refresh the OAuth token.
Model ID not found
  • Use wednesdayai models list to see available model IDs.
  • WednesdayAI normalizes some model IDs: gemini-3-pro → gemini-3-pro-preview, gemini-3-flash → gemini-3-flash-preview.
Vertex AI: no credentials
  • Run gcloud auth application-default login to authenticate, or set GOOGLE_APPLICATION_CREDENTIALS to a service account key file.