Hacker News 中文摘要

RSS订阅

Anthropic宣布重新允许OpenClaw风格的Claude CLI使用 -- Anthropic says OpenClaw-style Claude CLI usage is allowed again

文章摘要

OpenClaw支持通过Anthropic API密钥和Claude CLI访问Claude模型系列,保留现有配置。用户可通过交互或非交互方式设置API密钥,并配置默认模型参数。Claude 4.6模型默认采用自适应思考模式,支持按消息或模型参数覆盖。OpenClaw的快速模式也支持直接访问Anthropic API。

文章总结

Anthropic (Claude) 集成指南

核心功能

Anthropic公司开发的Claude模型系列可通过API和CLI两种方式接入。OpenClaw平台同时支持Anthropic API密钥和Claude CLI复用,并兼容已配置的旧版令牌验证。

接入方式

API密钥接入(推荐)

  • 适用场景:标准API访问和按量计费
  • 配置方法bash openclaw onboard --anthropic-api-key "sk-ant-..."
  • 配置示例json { "env": { "ANTHROPIC_API_KEY": "sk-ant-..." }, "agents": { "defaults": { "model": { "primary": "anthropic/claude-opus-4-6" } } } }

智能思考模式

  • 默认采用adaptive思考模式
  • 支持通过/think:<level>或模型参数覆盖默认设置
  • 相关文档:

快速模式

  • /fast on对应service_tier: "auto"
  • /fast off对应service_tier: "standard_only"
  • 注意
    • 仅对直连api.anthropic.com的请求生效
    • 显式设置的serviceTier参数会覆盖默认值

提示缓存功能

  • 缓存时长选项: | 值 | 时长 | 说明 | |---|---|---| | none | 无缓存 | 禁用缓存 | | short | 5分钟 | API密钥默认值 | | long | 1小时 | 长时缓存 |

  • 配置示例json { "agents": { "defaults": { "models": { "anthropic/claude-opus-4-6": { "params": { "cacheRetention": "long" } } } } } }

百万级上下文窗口(Beta功能)

  • 需显式设置params.context1m: true
  • 仅支持Opus/Sonnet模型
  • 注意:旧版令牌验证(sk-ant-oat-*)不支持此功能

CLI后端支持

  • 支持复用Claude CLI (claude -p)
  • 但API密钥仍是生产环境推荐方案

常见问题排查

  1. 401错误:建议迁移至API密钥验证
  2. 密钥未找到:需为每个代理单独配置
  3. 凭证不可用:可通过openclaw models status检查状态

完整文档参见: - 问题排查指南 - 常见问答

评论总结

以下是评论内容的总结,平衡呈现不同观点并保留关键引用:

负面评价:产品策略混乱与信任危机 1. 对Anthropic混乱的产品策略和沟通方式表示不满: - "I don’t think I’ve seen a more confused and shambolic product strategy"(评论1) - "No official statement and not even a tweet?"(评论10)

  1. 用户信任度下降,部分用户已转向竞争对手:
    • "The sentient had already sailed. It's hard to trust Anthropic"(评论6)
    • "Damage done, users know that Anthrophic will pull the rug from under them again"(评论9)

技术问题与使用体验 1. 代码支持功能的不稳定性: - "Can we get OpenCode support back as well?"(评论3) - "I got sick of the inconsistency caused by Anthropic tinkering with Claude Code"(评论5)

  1. 账户无故被封禁问题:
    • "Anthropic disabled my account without explanation beyond 'suspicious signals'"(评论13)

正面/中立评价 1. 部分用户仍认可其技术伦理: - "I still trust in their ethics. Please don't prove me wrong"(评论24)

  1. 政策恢复带来希望:
    • "OpenClaw says Anthropic says OpenClaw-style Claude CLI usage is okay again"(评论7)

关键争议点 1. 政策反复无常: - "Anthropic staff have had contradictive statements...Their intent for clarifications lead to confusion"(评论12)

  1. 计算资源限制的猜测:

    • "maybe it was all compute constrained"(评论8)
  2. 定价策略担忧:

    • "How long till the $1000 ultra plan...or they just want us all paying API credits instead"(评论16)

中文用户观点 1. 对政策摇摆的困惑: - "anthropic seems to be schizophrenic, sometimes worried about insufficient computing power and sometimes worried about user loss"(评论20)

  1. 技术效率问题:
    • "你们不觉得在openclaw里用claude相当浪费token吗?"(评论23)