cursor-deepseek  by danilofalcao

HTTP/2 proxy for using DeepSeek, OpenRouter, and Ollama models with Cursor IDE

created 6 months ago
574 stars

Top 57.0% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a high-performance HTTP/2 proxy server designed to bridge Cursor IDE's Composer and other OpenAI-compatible clients with alternative language models like DeepSeek, OpenRouter, and Ollama. It translates API requests, enabling users to leverage these models for AI-assisted coding and development without being tied to OpenAI's ecosystem.

How It Works

The proxy server is built with Go and leverages HTTP/2 for efficient communication. It intercepts requests formatted for the OpenAI API and transforms them into the specific formats required by DeepSeek, OpenRouter, or Ollama. Key features include full CORS support, streaming responses, function calling translation, automatic message format conversion, and compression support. This approach allows seamless integration with existing tools that expect an OpenAI-compatible endpoint.

Quick Start & Requirements

  • Install/Run:
    • Build Docker image: docker build -t cursor-deepseek . (or use --build-arg PROXY_VARIANT=openrouter or ollama)
    • Run container: docker run -p 9000:9000 --env-file .env cursor-deepseek
    • Alternatively, run locally: go run proxy.go
  • Prerequisites: Go 1.19+, DeepSeek/OpenRouter API key, or Ollama server running locally.
  • Setup: Requires configuring API keys in a .env file. Exposing the endpoint publicly (e.g., via ngrok) is recommended for external access.
  • Docs: README

Highlighted Details

  • Supports DeepSeek, OpenRouter, and Ollama models.
  • Translates gpt-4o to DeepSeek's GPT-4o equivalent.
  • Handles chat completions and model listing endpoints.
  • Includes Brotli compression support.

Maintenance & Community

The project is maintained by danilofalcao. Further community or roadmap information is not detailed in the README.

Licensing & Compatibility

  • License: GNU General Public License v2.0 (GPLv2).
  • Compatibility: GPLv2 is a strong copyleft license. Commercial use or linking with closed-source software may require careful consideration of license obligations.

Limitations & Caveats

The project requires a Cursor Pro subscription for its primary use case. While it supports multiple model providers, the README does not detail performance benchmarks or specific model compatibility beyond the primary mappings.

Health Check
Last commit

5 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
22 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.