mirror of
https://github.com/nearai/ironclaw.git
synced 2026-09-02 23:56:24 +08:00
160 lines
4.2 KiB
Plaintext
160 lines
4.2 KiB
Plaintext
---
|
|
title: LLM Providers
|
|
sidebarTitle: Overview
|
|
description: Choose your AI model provider
|
|
---
|
|
|
|
IronClaw supports multiple LLM backends. Choose the provider that best fits your needs.
|
|
|
|
## Provider Comparison
|
|
|
|
| Provider | Backend | Local | Privacy | Cost | Best For |
|
|
|----------|---------|-------|---------|------|----------|
|
|
| **NEAR AI** | `nearai` | ✗ | ★★★ | $ | Default, easy setup |
|
|
| **Anthropic** | `anthropic` | ✗ | ★★★ | $$ | Claude models |
|
|
| **OpenAI** | `openai` | ✗ | ★★ | $$ | GPT models |
|
|
| **Ollama** | `ollama` | ✓ | ★★★★★ | Free | Local inference |
|
|
| **Tinfoil** | `tinfoil` | ✗ | ★★★★★ | $$ | TEE privacy |
|
|
| **OpenRouter** | `openai_compatible` | ✗ | ★★ | $ | Model variety |
|
|
| **Moonshot** | `openai_compatible` | ✗ | ★★★ | $$ | Kimi K2.5 |
|
|
|
|
## Quick Selection Guide
|
|
|
|
<Tabs>
|
|
<Tab title="Easiest">
|
|
**NEAR AI** — Default provider, works out of the box
|
|
- Browser OAuth or API key
|
|
- Multiple models
|
|
- No credit card required to start
|
|
</Tab>
|
|
|
|
<Tab title="Most Private">
|
|
**Ollama** — Run models locally
|
|
- No data leaves your machine
|
|
- Free
|
|
- Requires GPU for larger models
|
|
</Tab>
|
|
|
|
<Tab title="Best Models">
|
|
**Anthropic Claude** — Industry-leading reasoning
|
|
- Excellent for complex tasks
|
|
- Long context window
|
|
- Higher cost
|
|
</Tab>
|
|
|
|
<Tab title="Model Variety">
|
|
**OpenRouter** — Access 300+ models
|
|
- Single API key
|
|
- Mix of commercial and open models
|
|
- Pay-as-you-go
|
|
</Tab>
|
|
</Tabs>
|
|
|
|
## Available Providers
|
|
|
|
<CardGroup cols={2}>
|
|
<Card title="NEAR AI" icon="star" href="/providers/nearai">
|
|
Default provider. Browser OAuth or API key. Multiple models including Claude.
|
|
</Card>
|
|
|
|
<Card title="Anthropic" icon="triangle" href="/providers/anthropic">
|
|
Claude models directly. Best reasoning and long context.
|
|
</Card>
|
|
|
|
<Card title="OpenAI" icon="circle" href="/providers/openai">
|
|
GPT-4o, GPT-4o-mini, o3-mini. Direct API access.
|
|
</Card>
|
|
|
|
<Card title="Ollama" icon="download" href="/providers/ollama">
|
|
Local inference. Free, private. Llama, Mistral, Qwen, and more.
|
|
</Card>
|
|
|
|
<Card title="OpenAI-Compatible" icon="layers" href="/providers/openai-compatible">
|
|
OpenRouter, Together AI, Fireworks, vLLM, LiteLLM, LM Studio.
|
|
</Card>
|
|
|
|
<Card title="Tinfoil" icon="shield" href="/providers/tinfoil">
|
|
Hardware-attested TEE. Neither Tinfoil nor cloud can see prompts.
|
|
</Card>
|
|
|
|
<Card title="Moonshot" icon="sparkles" href="/providers/moonshot">
|
|
Kimi K2.5 with 256K context. Advanced reasoning and long-context models.
|
|
</Card>
|
|
</CardGroup>
|
|
|
|
## Switching Providers
|
|
|
|
Change providers by updating environment variables and restarting:
|
|
|
|
```bash
|
|
# Edit ~/.ironclaw/.env
|
|
export LLM_BACKEND=anthropic
|
|
export ANTHROPIC_API_KEY=sk-ant-...
|
|
|
|
# Restart IronClaw
|
|
ironclaw run
|
|
```
|
|
|
|
Or re-run the wizard:
|
|
|
|
```bash
|
|
ironclaw onboard --skip-auth
|
|
```
|
|
|
|
## Configuration
|
|
|
|
All providers are configured via environment variables:
|
|
|
|
```bash
|
|
# In ~/.ironclaw/.env
|
|
LLM_BACKEND=anthropic
|
|
ANTHROPIC_API_KEY=sk-ant-...
|
|
ANTHROPIC_BASE_URL=https://api.anthropic.com # optional
|
|
```
|
|
|
|
See [Configuration](/setup/configuration) for the complete reference.
|
|
|
|
## Privacy Considerations
|
|
|
|
| Provider | Data Handling |
|
|
|----------|---------------|
|
|
| **NEAR AI** | Prompts/responses sent to NEAR AI |
|
|
| **Anthropic** | Prompts/responses sent to Anthropic |
|
|
| **OpenAI** | Prompts/responses sent to OpenAI |
|
|
| **Ollama** | No external data transmission |
|
|
| **Tinfoil** | Encrypted in TEE, provider cannot see |
|
|
|
|
For maximum privacy, use **Ollama** (local) or **Tinfoil** (TEE).
|
|
|
|
## Cost Estimation
|
|
|
|
Rough cost per 1K tokens (input + output):
|
|
|
|
| Provider | Cost |
|
|
|----------|------|
|
|
| Ollama | Free (GPU/electricity only) |
|
|
| OpenAI GPT-4o-mini | ~$0.60 |
|
|
| NEAR AI | ~$1-3 |
|
|
| OpenAI GPT-4o | ~$5-10 |
|
|
| Anthropic Claude | ~$3-15 |
|
|
|
|
Actual costs vary by model and usage.
|
|
|
|
## Next Steps
|
|
|
|
Choose your provider:
|
|
|
|
<CardGroup cols={3}>
|
|
<Card title="Start with NEAR AI" icon="rocket" href="/providers/nearai">
|
|
Default provider — easiest to set up
|
|
</Card>
|
|
|
|
<Card title="Go Local" icon="lock" href="/providers/ollama">
|
|
Maximum privacy with Ollama
|
|
</Card>
|
|
|
|
<Card title="Use Claude" icon="brain" href="/providers/anthropic">
|
|
Best reasoning capabilities
|
|
</Card>
|
|
</CardGroup>
|