用 Claude 订阅令牌桥接 OpenClaw,替代 API Key 成本爆炸
社区给出从 API key 迁移到 VS Code 扩展订阅令牌的实操流程,目标是把个人开发成本从按量计费转为订阅封顶。步骤依赖版本和权限,迁移前需验证。
REDDITDiscovered 2026-02-12Author u/Tator-Tot-420
Prerequisites
- VS Code + Claude Code extension installed, with active Claude Pro/Team subscription.
- You have permission to edit OpenClaw model/auth config and restart gateway.
Steps
- Authenticate Claude Code extension account token in VS Code (`claude setup token`) and finish browser authorization.
- Back up current OpenClaw auth config, then remove legacy Anthropic API-key profile to avoid fallback conflicts.
- Re-add Anthropic model using subscription-token compatible setup path (instead of API key path).
- Restart gateway and run a real channel smoke test (e.g., Telegram round trip).
- Optionally set a stronger default model only after confirming stable token-based auth.
Commands
claude setup tokenopenclaw gateway statusopenclaw gateway restartVerify
Agent requests succeed without API-key billing path, and repeated test turns remain stable under subscription auth.
Caveats
- Subscription plans still have usage caps/rate limits; this is cost-capping, not true unlimited.
- CLI command names and auth UX may differ by extension/version(需验证).
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗