Status: [UNTESTED] Endpoints found: http://localhost:8080/v1/chat/completions Source: https://github.com/lalalalahu/gemini-rd-web-proxy # Gemini Web Proxy for OpenCode A free Gemini web interface proxy that works as an OpenAI-compatible API for OpenCode. This project allows you to use your free Gemini web subscription as a local API provider with full tool calling support. **Educational Purpose**: This project is created for learning purposes to demonstrate how to build custom providers for OpenCode using browser automation. ## What This Does - Converts Gemini web interface into an OpenAI-compatible API - Enables free Gemini usage in OpenCode without API keys - Supports tool calling and function execution - Maintains persistent login sessions - Works completely locally on your machine ## How It Works 1. Uses Playwright to automate the Gemini web interface 2. Translates OpenCode requests to Gemini web format 3. Extracts responses and converts them back to OpenAI format 4. Handles tool calling through advanced prompt engineering 5. Maintains session state for continuous conversations ## Requirements - Python 3.8 or higher - Google account with Gemini access - Chrome browser installed - OpenCode installed ## Installation ### Quick Setup (Recommended) ```bash git clone cd gemini-web-proxy chmod +x setup.sh ./setup.sh ``` ### Manual Setup ### Step 1: Clone and Setup ```bash git clone cd gemini-web-proxy ``` ### Step 2: Install Dependencies ```bash # Install Python dependencies pip install -r requirements.txt # Install Playwright browsers playwright install chromium ``` ### Step 3: First Run and Login ```bash python run.py ``` On first run: 1. Chrome browser will open automatically 2. Log in to your Google account 3. Navigate to Gemini if not redirected automatically 4. Wait for "Login saved" message 5. Browser will restart in headless mode ### Step 4: Configure OpenCode Add this configuration to your OpenCode config file: **Location**: `~/.config/opencode/opencode.json` or your project's `opencode.json` ```json { "providers": { "00bx-gemini