You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Anthropic OAuth cleanup flow in setup wizard
Detects legacy Anthropic OAuth profiles that now incur Extra Usage.
Offers 3 options: remove, keep, or migrate to API key.
Added troubleshooting entry for manual cleanup.
Copy file name to clipboardExpand all lines: SKILL.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,6 +99,54 @@ Check if `~/.openclaw/zeroapi-config.json` exists.
99
99
-**Re-run**: Read existing config, show current subscriptions and routing rules. Ask: "What changed? New subscription, dropped provider, or full reconfiguration?"
100
100
-**First run**: Continue to Step 2.
101
101
102
+
### Step 1b: Detect Anthropic OAuth Profiles
103
+
104
+
Check the user's `openclaw.json` for Anthropic OAuth profiles:
If `auth.profiles` contains entries like `"anthropic:[email protected]"` with `"mode": "oauth"`, these are **subscription-based Anthropic tokens** that no longer cover OpenClaw usage (as of April 4, 2026). They will incur Extra Usage (per-token) charges if left active.
110
+
111
+
**If Anthropic OAuth profiles are found, ask the user:**
112
+
113
+
> "I found Anthropic OAuth profiles in your config. Since April 4, 2026, Claude subscriptions no longer cover OpenClaw — these profiles will bill Extra Usage (per-token) if used. What would you like to do?
114
+
>
115
+
> A) **Remove them** — I'll clean up all Anthropic OAuth profiles and remove Anthropic from your fallback chains. Recommended if you don't want per-token billing.
116
+
>
117
+
> B) **Keep them** — They still work but will bill separately from your subscription. Choose this if you have an Anthropic API key or want to pay Extra Usage.
118
+
>
119
+
> C) **Migrate to API key** — Remove OAuth profiles and set up an Anthropic API key instead (standard per-token billing, cleaner setup)."
120
+
121
+
**If user chooses A (Remove):**
122
+
123
+
1. Remove all `anthropic:*` entries from `auth.profiles`
124
+
2. Remove `"anthropic"` from `auth.order`
125
+
3. Remove any `anthropic/*` model refs from `agents.defaults.model.primary` and `fallbacks`
126
+
4. For each agent in `agents.list`: if `model.primary` is `anthropic/*`, switch to the best available subscription model
127
+
5. Remove `anthropic/*` from all cron job model assignments
128
+
6. Show summary of what was removed
129
+
130
+
```bash
131
+
# Verify removal
132
+
openclaw models status | grep anthropic
133
+
# Should return nothing
134
+
```
135
+
136
+
**If user chooses B (Keep):** Proceed. Note that Anthropic models will NOT be included in ZeroAPI routing (plugin skips them) but they remain available for manual `/model anthropic/claude-opus-4-6` use.
137
+
138
+
**If user chooses C (Migrate to API key):** Guide the user:
139
+
```bash
140
+
# Remove old OAuth profiles
141
+
# Then set up API key:
142
+
openclaw onboard --auth-choice anthropic-api-key
143
+
# Or for Claude CLI backend:
144
+
openclaw onboard --auth-choice anthropic-cli
145
+
```
146
+
Note: Even with an API key, Anthropic is NOT included in ZeroAPI routing. The API key enables manual use only.
147
+
148
+
**If no Anthropic profiles found:** Skip this step silently.
149
+
102
150
### Step 2: Ask Subscriptions
103
151
104
152
Ask the user: **"Which AI subscriptions do you have?"**
Copy file name to clipboardExpand all lines: references/troubleshooting.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,32 @@ ls ~/.openclaw/zeroapi-config.json
15
15
16
16
---
17
17
18
+
### Anthropic OAuth profiles still in config (Extra Usage billing risk)
19
+
20
+
**Cause**: Legacy Anthropic OAuth profiles (`anthropic:[email protected]` with `mode: "oauth"`) remain in `openclaw.json` after the April 4, 2026 billing change. These profiles still work but now incur Extra Usage (per-token) charges instead of being covered by your Claude subscription.
**Fix**: Run `/zeroapi` — the setup wizard detects Anthropic OAuth profiles and offers three options: remove, keep, or migrate to API key. If you want to remove manually:
28
+
29
+
```bash
30
+
# 1. Open openclaw.json
31
+
# 2. Remove all "anthropic:*" entries from auth.profiles
32
+
# 3. Remove "anthropic" array from auth.order
33
+
# 4. Remove any anthropic/* model refs from agents.defaults.model.primary and fallbacks
34
+
# 5. Check each agent in agents.list for anthropic/* model assignments
35
+
# 6. Restart gateway
36
+
systemctl --user restart openclaw-gateway.service
37
+
# 7. Verify
38
+
openclaw models status | grep anthropic
39
+
# Should return nothing
40
+
```
41
+
42
+
---
43
+
18
44
### "ZeroAPI Router not loaded"
19
45
20
46
**Cause**: The plugin is not installed or failed to load at gateway start.
0 commit comments