Skip to content

nanobridgerafa/cursor-deepseek-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NanoBridge

OpenAI-compatible retry and fallback gateway for Claude Code and AI agent workloads.

Built for developers dealing with:

  • unstable AI providers
  • model timeouts
  • provider failover
  • coding workload spikes
  • token cost optimization
  • multi-provider routing

Features

  • OpenAI-compatible API endpoint
  • Automatic retry handling
  • Smart fallback routing
  • Multi-provider failover
  • Claude Code friendly
  • Lightweight proxy architecture
  • Fast integration with existing tools

Use Cases

  • Reduce downtime during provider overload
  • Route requests across multiple AI APIs
  • Improve coding workflow stability
  • Lower AI coding costs with smart routing
  • Add fallback support for AI agents

Works With

  • Claude Code
  • OpenAI SDK
  • Cursor
  • Cline
  • Roo Code
  • Continue
  • AI agent frameworks
  • MCP workflows

⚑ What this solves

  • Cursor setup fails with DeepSeek
  • OpenAI-compatible API confusion
  • Wrong base URL / model issues
  • Slow or broken integrations

This repo gives you a clean working setup.


πŸš€ Quick Start

1. Cursor Config

{
  "apiKey": "YOUR_API_KEY",
  "baseURL": "https://platform.nanobridge.net/v1",
  "model": "deepseek-v4-pro"
}
---

# Features

- OpenAI-compatible API
- DeepSeek V4 Pro support
- Streaming support
- Long-context reasoning
- Coding-oriented inference routing
- Retry optimization
- Crypto payment support
- AI agent compatibility

---

# Supported Models

Currently available:

- deepseek-v4-pro
- deepseek-v3
- deepseek-reasoner

More models coming soon.

---

# Supported Tools

Works with:

- Cursor
- Cline
- Continue
- Aider
- OpenAI SDK
- LangChain
- LiteLLM
- AI agents

---

# API Endpoint

Base URL:

``` id="j1k2vs"
https://platform.nanobridge.net/v1

API Docs:

https://platform.nanobridge.net/api-docs


Quick Start

Python

Install SDK:

pip install openai

Example:

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://platform.nanobridge.net/v1"
)

response = client.chat.completions.create(
    model="deepseek-v4-pro",
    messages=[
        {
            "role": "user",
            "content": "Write a FastAPI middleware example"
        }
    ],
    stream=False
)

print(response.choices[0].message.content)

cURL Example

curl https://platform.nanobridge.net/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "deepseek-v4-pro",
    "messages": [
      {
        "role": "user",
        "content": "hello"
      }
    ]
  }'

Cursor Setup

Step 1 β€” Open Cursor Settings

Go to:

Cursor β†’ Settings β†’ Models

Enable:

OpenAI Compatible API

Step 2 β€” Configure API

Use:

{
  "apiKey": "YOUR_API_KEY",
  "baseURL": "https://platform.nanobridge.net/v1",
  "model": "deepseek-v4-pro"
}

Recommended AI Coding Workflow

DeepSeek V4 Pro works especially well for:

  • refactoring
  • bug fixing
  • code explanation
  • multi-file edits
  • long-context coding
  • reasoning-heavy workflows
  • autonomous coding agents

Streaming Support

Streaming is fully supported.

Recommended for:

  • lower perceived latency
  • coding copilots
  • interactive workflows
  • long generations

OpenAI Compatibility

Nanobridge is designed to be drop-in compatible with OpenAI-style APIs.

Supported:

  • /chat/completions
  • streaming
  • system prompts
  • multi-turn conversations

This makes integration easy with most modern AI developer tools.


Why Not Just Use OpenRouter?

Some developers prefer:

  • lower latency
  • coding-focused routing
  • simplified infrastructure
  • stable long-context workflows
  • direct DeepSeek optimization
  • crypto payment support

Nanobridge focuses specifically on AI coding workloads and developer workflows.


AI Agent Optimization

Optimized for:

  • coding agents
  • autonomous workflows
  • multi-step reasoning
  • tool-calling systems
  • development automation

Example Prompt Ideas

Try inside Cursor:

Refactor this codebase
Find concurrency issues
Optimize this SQL query
Explain this architecture

Best Practices

For best coding performance:

  • use focused prompts
  • split large tasks
  • restart long sessions periodically
  • prefer streaming mode
  • use explicit coding instructions

Common Issues

Timeout Problems

Possible causes:

  • overloaded providers
  • unstable routing
  • long reasoning chains

Possible solutions:

  • retry requests
  • shorten prompts
  • restart conversation sessions

Invalid Base URL

Make sure the Base URL is:

https://platform.nanobridge.net/v1

NOT:

https://platform.nanobridge.net/api-docs

Performance Goals

Current optimization targets:

  • lower latency
  • stable streaming
  • reliable coding workflows
  • reduced inference failures

Current Status

Project status:

  • Active development
  • Early production usage
  • API stability improvements ongoing

Roadmap

Planned improvements:

  • smarter routing
  • fallback optimization
  • additional models
  • lower latency
  • enhanced AI agent support
  • coding workflow tuning

Community

Website: https://www.nanobridge.ai

Platform: https://platform.nanobridge.net

API Docs: https://platform.nanobridge.net/api-docs

GitHub: https://github.com/nanobridgerafa


Disclaimer

Nanobridge is an independent inference gateway project and is not affiliated with OpenAI or DeepSeek.

Releases

No releases published

Packages

 
 
 

Contributors