Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Expose Gemini CLI endpoints as OpenAI API with Cloudflare Workers
| Date | Stars |
|---|---|
| 2026-07-31 | 894 |
| 2026-08-06 | 894 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# 🚀 Gemini CLI OpenAI Worker [](https://www.buymeacoffee.com/mrproper) Transform Google's Gemini models into OpenAI-compatible endpoints using Cloudflare Workers. Access Google's most advanced AI models through familiar OpenAI API patterns, powered by OAuth2 authentication and the same infrastructure that drives the official Gemini CLI. ## ✨ Features - 🔐 **OAuth2 Authentication** - No API keys required, uses your Google account - 🎯 **OpenAI-Compatible API** - Drop-in replacement for OpenAI endpoints - 📚 **OpenAI SDK Support** - Works with official OpenAI SDKs and libraries - 🖼️ **Vision Support** - Multi-modal conversations with images (base64 & URLs) - 🔧 **Tool Calling Support** - Function calling with Gemini API integration - 🧠 **Advanced Reasoning** - Support for Gemini's thinking capabilities with effort controls - 🛡️ **Content Safety** - Configurable Gemini moderation settings - 🌐 **Third-party Integration** - Compatible with Open WebUI, ChatGPT clients, and more - ⚡ **Cloudflare Workers** - Global edge deployment with low latency - 🔄 **Smart Token Caching** - Intelligent token management with KV storage - 🆓 **Free Tier Access** - Leverage Google's free tier through Code Assist API - 📡 **Real-time Streaming** - Server-sent events for live responses with token usage - 🎭 **Multiple Models** - Access to latest Gemini models including experimental ones ## 🤖 Supported Models | Model ID | Context Window | Max Tokens | Thinking Support | Description | |----------|----------------|------------|------------------|-------------| | `gemini-2.5-pro` | 1M | 65K | ✅ | Latest Gemini 2.5 Pro model with reasoning capabilities | | `gemini-2.5-flash` | 1M | 65K | ✅ | Fast Gemini 2.5 Flash model with reasoning capabilities | | `gemini-2.5-flash-lite` | 1M | 65K | ✅ | Lightweight version of Gemini 2.5 Flash model with reasoning capabilities | > **Note:** Gemini 2.5 models have thinking enabled by default. The API automatically manages this: > - When real thinking is disabled (environment), thinking budget is set to 0 to disable it > - When real thinking is enabled (environment), thinking budget defaults to -1 (dynamic allocation by Gemini) > > **Thinking support** has two modes: > - **Fake thinking**: Set `ENABLE_FAKE_THINKING=true` to generate synthetic reasoning text (good for testing) > - **Real thinking**: Set `ENABLE_REAL_THINKING=true` to use Gemini's native reasoning capabilities > > Real thinking is controlled entirely by the `ENABLE_REAL_THINKING` environment variable. You can optionally set a `"thinking_budget"` in your request (token limit for reasoning, -1 for dynamic allocation, 0 to disable thinking entirely). - **Reasoning Effort Support**: You can control the reasoning effort of thinking models by including `reasoning_effort` in the request body (e.g., `extra_body` or `model_params`). This parameter allows you to fine-tune the model's internal reasoning process, balancing between speed and depth of thought. - `none`: Disables thinking (`thinking_budget = 0`). - `low`: Sets `thinking_budget = 1024`. - `medium`: Sets `thinking_budget = 12288` for flash models, `16384` for other models. - `high`: Sets `thinking_budget = 24576` for flash models, `32768` for other models. > > Set `STREAM_THINKING_AS_CONTENT=true` to stream reasoning as content with `<thinking>` tags (DeepSeek R1 style) instead of using the reasoning field. ## �🛠️ Setup ### Prerequisites 1. **Google Account** with access to Gemini 2. **Cloudflare Account** with Workers enabled 3. **Wrangler CLI** installed (`npm install -g wrangler`) ### Step 1: Get OAuth2 Credentials You need OAuth2 credentials from a Google account that has accessed Gemini. The easiest way to get these is through the official Gemini CLI. #### Using Gemini CLI 1. **Install Gemini CLI**: ```bash npm install -g @google/gemini-cli ``` 2. **Start the Gemini CLI**:
Excerpt of 25,174 characters
Read on GitHub102
33
2
1
1
1
1
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:770c9c1606c88863, topic:llm