{"id":25602656,"url":"https://github.com/pezzos/cursor-openrouter-proxy","last_synced_at":"2025-04-13T09:04:32.314Z","repository":{"id":274485225,"uuid":"923020486","full_name":"pezzos/cursor-openrouter-proxy","owner":"pezzos","description":"This project sets up a Docker Compose configuration for the Cursor Deepseek API Proxy","archived":false,"fork":false,"pushed_at":"2025-02-17T11:23:29.000Z","size":25,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T00:34:01.659Z","etag":null,"topics":["cursor","deepseek","docker","docker-compose"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pezzos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-27T14:06:13.000Z","updated_at":"2025-03-19T16:01:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"ec647ac0-8291-4c34-9230-22d1cafba47c","html_url":"https://github.com/pezzos/cursor-openrouter-proxy","commit_stats":null,"previous_names":["pezzos/config-deepseek_api_proxy","pezzos/cursor-proxy-for-deepseek"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pezzos%2Fcursor-openrouter-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pezzos%2Fcursor-openrouter-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pezzos%2Fcursor-openrouter-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pezzos%2Fcursor-openrouter-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pezzos","download_url":"https://codeload.github.com/pezzos/cursor-openrouter-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688568,"owners_count":21145766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cursor","deepseek","docker","docker-compose"],"created_at":"2025-02-21T17:02:37.166Z","updated_at":"2025-04-13T09:04:32.287Z","avatar_url":"https://github.com/pezzos.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cursor OpenRouter Proxy\n\nA high-performance HTTP/2-enabled proxy server that enables Cursor IDE (including Composer) to use any LLM available through OpenRouter. By making Cursor believe it's talking to GPT-4, this proxy translates OpenAI-compatible API requests to work with any model available on OpenRouter, allowing seamless integration with Cursor's features.\n\n## Primary Use Case\n\nThis proxy enables Cursor IDE users to leverage any LLM available on OpenRouter through Cursor's interface, including the Composer. Simply point Cursor to this proxy with any key, and it will handle all the necessary translations to make your chosen model work as if it were GPT-4.\n\n## Features\n\n- Dynamic model switching via API endpoint without container reload\n- HTTP/2 support for improved performance\n- Full CORS support\n- Streaming responses\n- Support for function calling/tools\n- Automatic message format conversion\n- Compatible with OpenAI API client libraries\n- API key validation\n- Traefik integration ready\n- Docker container support\n\n## Prerequisites\n\n- Cursor Pro Subscription\n- OpenRouter API key\n- Docker and Docker Compose\n- Traefik (for reverse proxy)\n\n## Quick Start with Docker Compose\n\n1. Clone the repository\n2. Configure environment:\n   ```bash\n   cp .env.example .env\n   ```\n   Edit `.env` and add your OpenRouter API key and preferred model\n\n3. Start with Docker Compose:\n   ```bash\n   docker-compose up -d\n   ```\n\n## Configuration\n\nThe `.env` file controls your setup:\n\n```bash\n# Required\nOPENROUTER_API_KEY=your_openrouter_api_key_here\n# Optional - defaults to anthropic/claude-3-opus-20240229\nOPENROUTER_MODEL=your_preferred_model\n```\n\nAvailable models can be found at [OpenRouter's model list](https://openrouter.ai/models).\n\n## Usage\n\n### Basic Usage\n\nPoint Cursor to `http://your-proxy:9000/v1` (or `https://cursor-proxy.$YOURDOMAIN/v1`) as the OpenAI API endpoint and keep GTP-4o as model.\nThe proxy will automatically:\n1. Translate Cursor's GPT-4o requests to your chosen model\n2. Handle all necessary format conversions\n3. Stream responses back to Cursor\n\n### Dynamic Model Switching\n\nSwitch models without restarting using the API endpoint:\n\n```bash\ncurl -X POST http://your-proxy:9000/switch-model \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\": \"anthropic/claude-3-opus-20240229\"}'\n```\n\n### Traefik Integration\n\nUpdate your docker-compose.yml to include Traefik labels:\n\n```yaml\nservices:\n  cursor-proxy:\n    labels:\n      - \"traefik.enable=true\"\n      - \"traefik.http.routers.cursor-proxy.rule=Host(`your-domain`)\"\n      - \"traefik.http.services.cursor-proxy.loadbalancer.server.port=9000\"\n```\n\n## Supported Endpoints\n\n- `/v1/chat/completions` - Chat completions endpoint\n- `/v1/models` - Models listing endpoint\n- `/switch-model` - Dynamic model switching endpoint\n\n## Security\n\n- CORS headers for cross-origin requests\n- API key validation\n- Secure request/response handling\n- HTTPS support through HTTP/2\n- Environment variables protection\n\n## License\n\nThis project is licensed under the GNU General Public License v2.0 (GPLv2). See the [LICENSE.md](LICENSE.md) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpezzos%2Fcursor-openrouter-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpezzos%2Fcursor-openrouter-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpezzos%2Fcursor-openrouter-proxy/lists"}