Connect nanobot to OpenRouter, Anthropic, OpenAI, DeepSeek, Gemini, and more
Learn how the nanobot Provider Registry enables 2-step integration with any LLM provider
The nanobot ai framework supports 11+ LLM providers out of the box, with a Provider Registry architecture that makes adding new providers incredibly simple. Whether you prefer OpenRouter for unified access, Anthropic's Claude for advanced reasoning, or local models via vLLM, the nano bot has you covered.
The nanobot framework integrates with OpenRouter, Anthropic, OpenAI, DeepSeek, Google Gemini, Zhipu, DashScope, Moonshot, Groq, AiHubMix, and vLLM. Every nano bot instance can switch between providers seamlessly.
Adding a new LLM provider to nanobot ai requires just 2 steps: create a provider class and register it with the Provider Registry. The nano bot architecture handles the rest automatically.
The nanobot Provider Registry is a centralized system that manages all LLM integrations. This architectural choice keeps the core nanobot codebase clean while enabling unlimited provider extensibility.
The nanobot ai assistant ships with built-in support for the most popular LLM providers. Each provider in the nano bot system is fully tested and production-ready.
Unified access to 200+ models from multiple providers. The recommended choice for nanobot users who want maximum flexibility without managing multiple API keys.
Claude Opus, Claude Sonnet, and Claude Haiku models. Excellent reasoning capabilities make Anthropic a top choice for complex nanobot ai tasks.
GPT-4, GPT-4 Turbo, GPT-3.5, and other OpenAI models. The nanobot framework supports all standard OpenAI API endpoints.
High-performance Chinese LLM provider with competitive pricing. DeepSeek integration in the nano bot enables cost-effective AI assistant deployment.
Google's advanced multimodal models including Gemini Pro and Gemini Ultra. The nanobot ai framework supports Gemini API integration.
ChatGLM and other Zhipu AI models. Excellent for Chinese language tasks in nanobot applications.
Alibaba Cloud's LLM service with Qwen and other models. The nano bot supports DashScope for enterprise deployments in China.
Moonshot AI's long-context models. Ideal for nanobot ai applications requiring extended memory and context windows.
Ultra-fast LLM inference with Groq's specialized hardware. The nanobot framework leverages Groq for speed-critical applications.
Aggregated LLM access platform. The nano bot integrates with AiHubMix for unified multi-provider management.
Run local LLMs with vLLM inference server. Perfect for nanobot ai deployments requiring full data privacy and offline operation.
Add any LLM provider to nanobot in 2 steps. The Provider Registry makes custom integrations simple for the nano bot framework.
Configuring LLM providers for the nanobot ai assistant is straightforward. Each provider requires an API key and basic YAML configuration. The nano bot reads provider settings from your configuration file.
The nanobot configuration file is typically located at ~/.config/nanobot/config.yaml or in your project directory. All LLM provider credentials are stored securely in this file.
# nanobot configuration example
llm:
provider: "openrouter" # or anthropic, openai, deepseek, etc.
api_key: "your-api-key-here"
model: "anthropic/claude-3.5-sonnet" # model identifier
Note: The nanobot ai framework uses environment variables or config files for API keys. Never commit API keys to version control. The nano bot supports multiple provider configurations for easy switching.
OpenRouter is the recommended LLM provider for nanobot ai users. It provides unified access to 200+ models from multiple providers through a single API, eliminating the need to manage multiple API keys. The nano bot works seamlessly with OpenRouter's standardized interface.
# nanobot OpenRouter config
llm:
provider: "openrouter"
api_key: "sk-or-v1-..."
model: "anthropic/claude-3.5-sonnet"
# OR any model from OpenRouter catalog
Get API Key: Visit OpenRouter.ai to create an account and generate your API key for the nanobot ai assistant.
anthropic/claude-3.5-sonnet - Best reasoning for nano bot tasksopenai/gpt-4-turbo - GPT-4 via OpenRoutergoogle/gemini-pro - Google Gemini modelsmeta-llama/llama-3.1-70b - Open source Llama 3.1deepseek/deepseek-chat - Cost-effective Chinese LLMAnthropic's Claude models are excellent choices for the nanobot ai framework when you need advanced reasoning, long context windows, and reliable performance. The nano bot supports Claude Opus, Claude Sonnet, and Claude Haiku.
# nanobot Anthropic config
llm:
provider: "anthropic"
api_key: "sk-ant-..."
model: "claude-3-5-sonnet-20241022"
Get API Key: Visit console.anthropic.com to create an account and generate your Anthropic API key for the nanobot assistant.
OpenAI's GPT models are widely used with the nanobot ai assistant. The nano bot framework supports GPT-4, GPT-4 Turbo, GPT-3.5, and other OpenAI models through their official API.
# nanobot OpenAI config
llm:
provider: "openai"
api_key: "sk-proj-..."
model: "gpt-4-turbo-preview"
Get API Key: Visit platform.openai.com to create an account and generate your OpenAI API key for the nanobot framework.
Beyond OpenRouter, Anthropic, and OpenAI, the nanobot ai assistant supports many specialized providers. Each provider offers unique advantages for different nano bot use cases.
llm:
provider: "deepseek"
api_key: "sk-..."
model: "deepseek-chat"
Cost-effective Chinese LLM for nanobot. Excellent performance-to-price ratio for nano bot deployments.
llm:
provider: "gemini"
api_key: "AI..."
model: "gemini-pro"
Google's advanced multimodal models for nanobot ai. Get API keys from Google AI Studio.
llm:
provider: "zhipu"
api_key: "..."
model: "chatglm-turbo"
ChatGLM models for Chinese language nanobot applications. Excellent for nano bot tasks in Chinese.
llm:
provider: "dashscope"
api_key: "sk-..."
model: "qwen-turbo"
Alibaba Cloud LLM service for enterprise nanobot ai deployments in China.
llm:
provider: "moonshot"
api_key: "sk-..."
model: "moonshot-v1-8k"
Long-context models for nanobot applications requiring extended memory windows.
llm:
provider: "groq"
api_key: "gsk_..."
model: "llama3-70b-8192"
Ultra-fast inference for speed-critical nano bot applications. Get keys from console.groq.com.
llm:
provider: "vllm"
base_url: "http://localhost:8000"
model: "meta-llama/Llama-3-70b"
Run local LLMs with vLLM for complete privacy. Perfect for offline nanobot ai deployments.
llm:
provider: "aihubmix"
api_key: "..."
model: "gpt-4"
Aggregated LLM platform for unified nanobot provider management.
The nanobot Provider Registry makes adding custom LLM providers incredibly simple. With just 2 steps, you can integrate any LLM API into the nano bot framework, whether it's a new commercial provider or a self-hosted model.
Create a Python class that inherits from the nanobot base provider class. Implement the required methods for chat completion, streaming, and token counting. The nano bot architecture makes this straightforward with clear interfaces.
# Example nanobot custom provider
class MyCustomProvider(BaseProvider):
def chat_completion(self, messages, model, **kwargs):
# Your API integration here
pass
Add your provider class to the nanobot ai Provider Registry. The registry automatically handles provider selection, initialization, and error handling. Once registered, your custom provider works like any built-in nano bot provider.
# Register custom provider with nanobot
from nanobot.providers import registry
registry.register("mycustom", MyCustomProvider)
The Provider Registry is a centralized system in the nanobot framework that manages all LLM integrations. When the nano bot processes a request, it:
This architecture keeps the core nanobot codebase clean (~4,000 lines) while enabling unlimited provider extensibility. Adding providers doesn't bloat the nano bot core β they're modular plugins.
Choosing the right LLM provider for your nanobot ai assistant depends on your use case, budget, and requirements. Here's a comparison to help you decide which provider works best for your nano bot deployment.
| Provider | Best For | Pricing | Speed | Context Window |
|---|---|---|---|---|
| OpenRouter | Unified access to 200+ models | Varies by model | Fast | Varies by model |
| Anthropic | Advanced reasoning, long context | Premium | Fast | 200K tokens |
| OpenAI | General purpose, reliable | Moderate-Premium | Fast | 128K tokens |
| DeepSeek | Cost-effective, Chinese support | Budget | Fast | 32K tokens |
| Gemini | Multimodal, Google ecosystem | Moderate | Fast | 1M tokens |
| Groq | Ultra-fast inference | Moderate | Very Fast | 8K-32K tokens |
| vLLM | Local deployment, privacy | Free (self-hosted) | Varies by hardware | Varies by model |
Start with OpenRouter for the nanobot ai assistant. One API key gives you access to all major models, making it easy to experiment without managing multiple credentials for your nano bot.
Use Anthropic Claude or OpenAI GPT-4 for production nanobot deployments. Both offer reliable performance, excellent reasoning, and strong API uptime for nano bot applications.
Consider DeepSeek or OpenAI GPT-3.5 for budget-conscious nanobot ai deployments. Both provide good performance at significantly lower costs for high-volume nano bot usage.
Deploy vLLM with local models for complete data privacy in your nanobot assistant. Perfect for sensitive applications where nano bot data cannot leave your infrastructure.
Ready to set up LLM providers for your nanobot ai assistant? Follow our configuration guide to connect your nano bot to OpenRouter, Anthropic, OpenAI, or any of the 11+ supported providers.