From c8ef0ee3b5e2d4870a1a9dec54bcd24552604f9e Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sun, 22 Feb 2026 04:48:44 -0500 Subject: [PATCH] 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 --- skills/claw-setup/README.md | 73 ++++++++++++++++++++++++++++++++++--- 1 file changed, 68 insertions(+), 5 deletions(-) diff --git a/skills/claw-setup/README.md b/skills/claw-setup/README.md index fbb20fb..759edb3 100644 --- a/skills/claw-setup/README.md +++ b/skills/claw-setup/README.md @@ -78,7 +78,7 @@ | **OpenClaw** | TypeScript | >1GB | ~500s | ✅ Import | ✅ | Full-featured, 1700+ plugins | | **NanoBot** | Python | ~100MB | ~30s | ✅ Import | ✅ | Research, Python devs | | **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 | ### Platform Selection Guide @@ -173,19 +173,82 @@ CONFIG nanobot gateway ``` -#### ZeroClaw + FREE Qwen +#### ZeroClaw + FREE Qwen (NATIVE Provider) ```bash # Install ZeroClaw 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 -# Import Qwen OAuth -export OPENAI_API_KEY=$(cat ~/.qwen/oauth-token.json | jq -r '.access_token') -export OPENAI_MODEL="qwen3-coder-plus" +# ZeroClaw has NATIVE qwen-oauth provider support! +# First, get OAuth credentials via Qwen Code: +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 ``` +### 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