claude-worker-proxy  by glidea

Cloud API format conversion proxy

Created 6 months ago
256 stars

Top 98.5% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

This project offers a Cloudflare Worker designed to act as a proxy, translating API requests for models like Google's Gemini and OpenAI's models into a format compatible with Anthropic's Claude API. It targets developers aiming to leverage Claude-native tools and workflows with alternative LLM providers, facilitating flexible request routing and potentially cost-effective usage.

How It Works

The solution deploys as a serverless function on Cloudflare Workers. It intercepts incoming requests, forwards them to the specified backend provider's API (e.g., Gemini, OpenAI) using their native endpoints, and then transforms the responses into the Claude API format. This enables compatibility with tools and libraries expecting Claude's interface, including support for streaming responses and function/tool calling.

Quick Start & Requirements

  • Primary Install/Run: Deploy to Cloudflare Workers using the Wrangler CLI.
    git clone https://github.com/glidea/claude-worker-proxy
    cd claude-worker-proxy
    npm install
    wrangler login # (Install globally if needed: npm i -g wrangler@latest)
    npm run deploycf
    
  • Prerequisites: Node.js, npm, Cloudflare account, and Wrangler CLI. Requires API keys for the target LLM providers (e.g., Gemini, OpenAI).
  • Links: Repository: https://github.com/glidea/claude-worker-proxy

Highlighted Details

  • One-click deployment to Cloudflare Workers.
  • Full compatibility with Claude Code and related routing tools.
  • Supports both streaming and non-streaming response formats.
  • Enables tool/function calling capabilities for proxied models.
  • Designed for zero-configuration setup.

Maintenance & Community

The author indicates the existence of an "AI learning and communication community" and shares personal AI content via a Xiaohongshu account. However, direct links to community channels (e.g., Discord, Slack) or a project roadmap are not provided in the README.

Licensing & Compatibility

The README does not specify a software license. Potential adopters should verify licensing terms, particularly concerning commercial use or integration into closed-source applications.

Limitations & Caveats

Functionality is dependent on the availability and API stability of the proxied model providers (Gemini, OpenAI, etc.) and the Cloudflare Workers environment. Example URLs in the documentation contain placeholders (e.g., xxxx.workers.dev) requiring user-specific configuration. Performance and cost efficiency are contingent on the chosen backend LLM and Cloudflare's service fees.

Health Check
Last Commit

3 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
11 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.