Run Claude Code (and any Anthropic SDK client) on NVIDIA NIM models via a local proxy.
Project description
nvd-claude-proxy
Run Claude Code — and any Anthropic SDK client — on enterprise-grade NVIDIA NIM models.
nvd-claude-proxy is a production-hardened local HTTP proxy that translates between the Anthropic Messages API and the NVIDIA NIM (OpenAI-compatible) API. It enables you to run Claude Code, the Anthropic SDK, and other clients using high-performance NVIDIA-hosted models with official-grade resilience and scaling.
🚀 Key Features
- Architectural Excellence: Fully decoupled core translation logic from the transport layer.
- Enterprise Resilience: Built-in Circuit Breakers and automated failover chains to protect against upstream outages.
- Scalable State: Distributed session management via Redis (with SQLite and In-Memory fallbacks).
- Official-Grade Security: Unified
AuthMiddlewareprotecting all endpoints with global API key enforcement. - Claude Code Optimized: Specifically tuned for Claude Code's complex tool-calling and reasoning patterns.
- Modular Pipeline: Event-driven streaming architecture for deterministic state management.
🛠 Deployment & Configuration
Environment Variables
| Variable | Default | Description |
|---|---|---|
NVIDIA_API_KEY |
(Required) | Your NVIDIA NIM API key. |
PROXY_API_KEY |
None | Optional key to protect the proxy itself. |
STORAGE_ENGINE |
sqlite |
Persistence backend: redis, sqlite, or memory. |
REDIS_URL |
None | Required if STORAGE_ENGINE=redis (e.g., redis://localhost:6379). |
PROXY_PORT |
8788 |
Local port for the proxy. |
RATE_LIMIT_RPM |
0 |
Global rate limit (requests per minute). 0 to disable. |
Quick Start
# Install the proxy
pip install nvd-claude-proxy[full]
# Export your API key
export NVIDIA_API_KEY=nvapi-...
# Run the proxy
ncp run
Then point your Claude Code at the proxy:
export ANTHROPIC_BASE_URL=http://localhost:8788
claude
🏗 Architecture
The proxy uses a Chain of Responsibility pattern for streaming events:
MetadataProcessor -> TextProcessor -> ToolProcessor -> SafetyProcessor -> FinalizerProcessor
This ensures that even complex interleaved reasoning and parallel tool calls are correctly reconstructed for the Anthropic SDK.
Official-Grade Infrastructure for the AI Era.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nvd_claude_proxy-1.1.7.tar.gz.
File metadata
- Download URL: nvd_claude_proxy-1.1.7.tar.gz
- Upload date:
- Size: 110.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1abbf4f4e48fbf8c5ba5f28fe5429fce1f8763359370b53b7ec88d765bb5a99
|
|
| MD5 |
c09bd1d5362e5f145dd6c3c2f19879f1
|
|
| BLAKE2b-256 |
e034bbec1199db115ee260dce8c2bc28931f7b8531dc8647526d1fce0e3b738c
|
File details
Details for the file nvd_claude_proxy-1.1.7-py3-none-any.whl.
File metadata
- Download URL: nvd_claude_proxy-1.1.7-py3-none-any.whl
- Upload date:
- Size: 134.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c33646c2b678409dcd58e46f3c88e2e05d0d646b100712a0c725fcb0438d122a
|
|
| MD5 |
3abf2ab4205f2028bd93cd3ce7e30593
|
|
| BLAKE2b-256 |
e1b187a1a67e0fb8c6fe71eecdfbd858a40291dd78a6b9ba6b9487a24bd13128
|