# 1rgs/claude-code-proxy

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/1rgs-claude-code-proxy).**

3,622 stars · 475 forks · Python

## Links

- GitHub: https://github.com/1rgs/claude-code-proxy
- awesome-repositories: https://awesome-repositories.com/repository/1rgs-claude-code-proxy.md

## Description

This project is an LLM API proxy gateway and compatibility layer designed to route, translate, and proxy requests between model clients and various large language model providers. It functions as a multi-provider router that maps model requests to alternative backends based on configurable tiers and capabilities.

The gateway acts as a translation layer that converts API request and response formats between different providers, such as OpenAI or Gemini, to ensure compatibility. It includes a tool-use proxy to handle the execution and processing of model tool definitions and function calls, and it supports an interface for translating and forwarding incremental streaming responses to reduce latency.

The system provides model provider abstraction, allowing the switching of backends without changing client application code. It manages conversation context tracking and utilizes a model-to-model mapping table to redirect requests based on model size and capability.

## Tags

### Artificial Intelligence & ML

- [LLM Gateways](https://awesome-repositories.com/f/artificial-intelligence-ml/llm-gateways.md) — Functions as a centralized interface that aggregates multiple LLM providers into a single, translated API.
- [API Translation Layers](https://awesome-repositories.com/f/artificial-intelligence-ml/api-translation-layers.md) — Converts API calls from one provider's format into another compatible format via a dedicated translation layer. ([source](https://github.com/1rgs/claude-code-proxy/blob/main/pyproject.toml))
- [Model Compatibility Proxies](https://awesome-repositories.com/f/artificial-intelligence-ml/model-compatibility-proxies.md) — Provides a proxy layer that standardizes request and response formats between different proprietary LLM providers to ensure compatibility.
- [Model Provider Abstractions](https://awesome-repositories.com/f/artificial-intelligence-ml/model-provider-abstractions.md) — Provides a normalized interface that allows switching between AI providers without changing application code.
- [Request-Response Translation Layers](https://awesome-repositories.com/f/artificial-intelligence-ml/request-response-translation-layers.md) — Converts incoming API calls and outgoing responses between different provider schemas to maintain client compatibility.
- [Response Translation Layers](https://awesome-repositories.com/f/artificial-intelligence-ml/response-translation-layers.md) — Converts model outputs from various providers back into a standardized API response structure. ([source](https://github.com/1rgs/claude-code-proxy#readme))
- [Tool-Execution Loops](https://awesome-repositories.com/f/artificial-intelligence-ml/tool-execution-loops.md) — Orchestrates the request-response cycle between an AI model's tool request and the external execution result.
- [Conversation History Managers](https://awesome-repositories.com/f/artificial-intelligence-ml/artificial-intelligence-tooling/language-model-integrations/conversation-history-managers.md) — Tracks and sequences message history to maintain dialogue state for stateful AI interactions. ([source](https://github.com/1rgs/claude-code-proxy/blob/main/tests.py))
- [Conversation Context Tracking](https://awesome-repositories.com/f/artificial-intelligence-ml/conversation-context-tracking.md) — Maintains a sequential history of messages to preserve dialogue state across multiple request cycles.
- [Model Tier Selectors](https://awesome-repositories.com/f/artificial-intelligence-ml/decision-trees/minimax/model-tier-selectors.md) — Redirects requests to different model sizes or tiers based on a predefined configuration mapping.
- [Streaming Interfaces](https://awesome-repositories.com/f/artificial-intelligence-ml/llm-gateways/streaming-interfaces.md) — Ships an interface for translating and forwarding incremental model responses to clients to reduce perceived latency.
- [LLM Response Streaming](https://awesome-repositories.com/f/artificial-intelligence-ml/llm-response-streaming.md) — Implements incremental delivery of model outputs to reduce perceived latency for the end user. ([source](https://github.com/1rgs/claude-code-proxy/blob/main/tests.py))
- [Model Identifier Mappings](https://awesome-repositories.com/f/artificial-intelligence-ml/model-identifier-mappings.md) — Redirects specific model requests to alternative provider backends based on a configurable mapping of capabilities. ([source](https://github.com/1rgs/claude-code-proxy#readme))

### Web Development

- [Provider-Agnostic LLM Routing](https://awesome-repositories.com/f/web-development/provider-agnostic-llm-routing.md) — Implements a gateway that routes requests to various LLM providers based on configurable tiers and capabilities independently of the provider API.
- [API Proxies](https://awesome-repositories.com/f/web-development/api-proxies.md) — Routes requests from compatible clients to different model providers using a translation middleware. ([source](https://github.com/1rgs/claude-code-proxy/blob/main/uv.lock))
- [Token Stream Relays](https://awesome-repositories.com/f/web-development/backend-to-frontend-bridges/real-time-event-relays/token-stream-relays.md) — Forwards incremental model outputs to the client in real time to minimize perceived latency.

### Part of an Awesome List

- [Tool-Use Proxies](https://awesome-repositories.com/f/awesome-lists/ai/ai-model-and-api-integration/tool-use-integrations/tool-use-proxies.md) — Provides a proxy to handle the execution and processing of model tool definitions and function calls. ([source](https://github.com/1rgs/claude-code-proxy/blob/main/tests.py))

### Networking & Communication

- [LLM Tool Proxies](https://awesome-repositories.com/f/networking-communication/proxy-servers/tool-execution-proxies/llm-tool-proxies.md) — Provides a middleman server that handles the execution and processing of model tool definitions and function calls.

### Data & Databases

- [LLM Backend Mappings](https://awesome-repositories.com/f/data-databases/database-table-generation/model-table-mappings/llm-backend-mappings.md) — Routes requests to alternative provider backends based on a configurable mapping of model capabilities and sizes.
- [Real-Time Text Streaming](https://awesome-repositories.com/f/data-databases/real-time-data-streaming/real-time-text-streaming.md) — Implements low-latency incremental response delivery for AI chat interfaces.
