Govern Gemini models and Gemini CLI¶
WSO2 API Platform works alongside the Google products and services you already use. Govern Gemini model traffic, route Gemini CLI through AI Gateway, and send gateway telemetry to Google Cloud.
End-to-end guides¶
A step-by-step guide for Gemini CLI.
-
Configure Google Gemini CLI with AI Gateway
Route Gemini CLI requests through a Gemini provider and an App LLM Proxy.
Guide · Gemini CLI · Hybrid
AI Gateway with Gemini models¶
Route, secure, and govern traffic to Gemini models through WSO2 AI Gateway, including traffic from Gemini CLI.
Gemini as an LLM provider¶
Register the Gemini API with the gateway. Applications call the gateway and never see the Gemini API key.
OpenAI-format requests¶
Keep clients on the OpenAI request format. A transformer policy converts requests and responses for Gemini.
Routing, token limits, cost control, and the other AI Workspace policies work the same way for every provider. See the AI Workspace overview.
Routing, token limits, cost control, and the gateway's other policies work the same way for every provider. See the AI Gateway documentation.
Google Cloud Monitoring and Cloud Trace¶
Send the metrics and traces of a gateway you run to Google Cloud through an OpenTelemetry Collector.
Metrics and traces¶
Point the collector at Cloud Monitoring for metrics and at Cloud Trace for traces.
Architecture and responsibility model¶
WSO2 API Platform and Google split the work like this:
| Scenario | WSO2 role | Google role | Runtime traffic |
|---|---|---|---|
| Gemini CLI through AI Gateway | Authenticates developers and applies guardrails, rate limits, and analytics | Hosts the Gemini models and bills the API key | Goes through WSO2 AI Gateway to the Gemini API |
| Applications calling Gemini models | Proxies and governs LLM requests | Hosts the Gemini models | Goes through WSO2 AI Gateway to the Gemini API |
| Gateway telemetry in Google Cloud | Emits metrics and traces from the gateway | Stores and displays the telemetry | The collector sends telemetry to Google Cloud without affecting API traffic |
Learn more¶
Related pages in the Google documentation:
To browse every guide by goal, see the Guides overview.