docs: clarify ZeroClaw native qwen-oauth vs OpenAI-compatible import
- Document ZeroClaw's native qwen-oauth provider with auto token refresh - Explain two import methods: Native vs OpenAI-compatible - Add OAuth credentials structure documentation - Add comparison table showing feature differences - Update platform table to show ZeroClaw has Native (not Import) OAuth support Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -78,7 +78,7 @@
|
|||||||
| **OpenClaw** | TypeScript | >1GB | ~500s | ✅ Import | ✅ | Full-featured, 1700+ plugins |
|
| **OpenClaw** | TypeScript | >1GB | ~500s | ✅ Import | ✅ | Full-featured, 1700+ plugins |
|
||||||
| **NanoBot** | Python | ~100MB | ~30s | ✅ Import | ✅ | Research, Python devs |
|
| **NanoBot** | Python | ~100MB | ~30s | ✅ Import | ✅ | Research, Python devs |
|
||||||
| **PicoClaw** | Go | <10MB | ~1s | ✅ Import | ✅ | Embedded, $10 hardware |
|
| **PicoClaw** | Go | <10MB | ~1s | ✅ Import | ✅ | Embedded, $10 hardware |
|
||||||
| **ZeroClaw** | Rust | <5MB | <10ms | ✅ Import | ✅ | Maximum performance |
|
| **ZeroClaw** | Rust | <5MB | <10ms | ✅ Native | ✅ | Maximum performance |
|
||||||
| **NanoClaw** | TypeScript | ~50MB | ~5s | ✅ Import | ✅ | WhatsApp integration |
|
| **NanoClaw** | TypeScript | ~50MB | ~5s | ✅ Import | ✅ | WhatsApp integration |
|
||||||
|
|
||||||
### Platform Selection Guide
|
### Platform Selection Guide
|
||||||
@@ -173,19 +173,82 @@ CONFIG
|
|||||||
nanobot gateway
|
nanobot gateway
|
||||||
```
|
```
|
||||||
|
|
||||||
#### ZeroClaw + FREE Qwen
|
#### ZeroClaw + FREE Qwen (NATIVE Provider)
|
||||||
```bash
|
```bash
|
||||||
# Install ZeroClaw
|
# Install ZeroClaw
|
||||||
wget https://github.com/zeroclaw-labs/zeroclaw/releases/latest/zeroclaw-linux-amd64
|
wget https://github.com/zeroclaw-labs/zeroclaw/releases/latest/zeroclaw-linux-amd64
|
||||||
chmod +x zeroclaw-linux-amd64 && sudo mv zeroclaw-linux-amd64 /usr/local/bin/zeroclaw
|
chmod +x zeroclaw-linux-amd64 && sudo mv zeroclaw-linux-amd64 /usr/local/bin/zeroclaw
|
||||||
|
|
||||||
# Import Qwen OAuth
|
# ZeroClaw has NATIVE qwen-oauth provider support!
|
||||||
export OPENAI_API_KEY=$(cat ~/.qwen/oauth-token.json | jq -r '.access_token')
|
# First, get OAuth credentials via Qwen Code:
|
||||||
export OPENAI_MODEL="qwen3-coder-plus"
|
qwen && /auth # Select Qwen OAuth → creates ~/.qwen/oauth_creds.json
|
||||||
|
|
||||||
|
# Configure ZeroClaw to use native qwen-oauth provider
|
||||||
|
cat > ~/.zeroclaw/config.toml << CONFIG
|
||||||
|
default_provider = "qwen-oauth"
|
||||||
|
default_model = "qwen3-coder-plus"
|
||||||
|
default_temperature = 0.7
|
||||||
|
CONFIG
|
||||||
|
|
||||||
|
# ZeroClaw reads ~/.qwen/oauth_creds.json directly with auto token refresh!
|
||||||
zeroclaw gateway
|
zeroclaw gateway
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Understanding Qwen OAuth Import Methods
|
||||||
|
|
||||||
|
```
|
||||||
|
┌─────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
│ QWEN OAUTH IMPORT METHODS │
|
||||||
|
├─────────────────────────────────────────────────────────────────────────────┤
|
||||||
|
│ │
|
||||||
|
│ METHOD 1: Native Provider (ZeroClaw ONLY) │
|
||||||
|
│ ───────────────────────────────────────────────────── │
|
||||||
|
│ • ZeroClaw has built-in "qwen-oauth" provider │
|
||||||
|
│ • Reads ~/.qwen/oauth_creds.json directly │
|
||||||
|
│ • Automatic token refresh using refresh_token │
|
||||||
|
│ • Tracks expiry_date and refreshes when needed │
|
||||||
|
│ • Configuration: default_provider = "qwen-oauth" │
|
||||||
|
│ │
|
||||||
|
│ METHOD 2: OpenAI-Compatible (All Other Platforms) │
|
||||||
|
│ ───────────────────────────────────────────────────── │
|
||||||
|
│ • Treats Qwen API as OpenAI-compatible endpoint │
|
||||||
|
│ • Extract access_token and use as OPENAI_API_KEY │
|
||||||
|
│ • Set OPENAI_BASE_URL=https://api.qwen.ai/v1 │
|
||||||
|
│ • Manual re-export needed when token expires │
|
||||||
|
│ │
|
||||||
|
│ COMPARISON: │
|
||||||
|
│ ┌─────────────────┬────────────────┬─────────────────────┐ │
|
||||||
|
│ │ Feature │ Native │ OpenAI-Compatible │ │
|
||||||
|
│ ├─────────────────┼────────────────┼─────────────────────┤ │
|
||||||
|
│ │ Token Refresh │ ✅ Automatic │ ❌ Manual │ │
|
||||||
|
│ │ Token Expiry │ ✅ Handled │ ⚠️ Re-export needed│ │
|
||||||
|
│ │ Platforms │ ZeroClaw only │ All others │ │
|
||||||
|
│ │ Config File │ ~/.qwen/oauth_creds.json │ env vars │ │
|
||||||
|
│ └─────────────────┴────────────────┴─────────────────────┘ │
|
||||||
|
│ │
|
||||||
|
└─────────────────────────────────────────────────────────────────────────────┘
|
||||||
|
```
|
||||||
|
|
||||||
|
### OAuth Credentials Structure
|
||||||
|
|
||||||
|
Qwen Code stores OAuth credentials in `~/.qwen/oauth_creds.json`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"access_token": "pIFwnvSC3fQPG0i5waDbozvUNEWE4w9x...",
|
||||||
|
"refresh_token": "9Fm_Ob-c8_WAT_3QvgGwVGfgoNfAdP...",
|
||||||
|
"token_type": "Bearer",
|
||||||
|
"resource_url": "portal.qwen.ai",
|
||||||
|
"expiry_date": 1771774796531
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
| Field | Purpose |
|
||||||
|
|-------|---------|
|
||||||
|
| `access_token` | Used for API authentication |
|
||||||
|
| `refresh_token` | Used to get new access_token when expired |
|
||||||
|
| `expiry_date` | Unix timestamp when access_token expires |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🤖 FEATURE 2: 25+ AI Providers
|
## 🤖 FEATURE 2: 25+ AI Providers
|
||||||
|
|||||||
Reference in New Issue
Block a user