跳到主内容
@wquguru
精选86Claude Agent SDK TypeScript(GitHub Releases)AI 编程与模型

Claude Agent SDK v0.3.311:弃用 Node.js 18.0,拆分缓存字段

v0.3.311

原文
发到 X
推荐理由

Node.js 最低版本要求提升及 ModelUsage 字段拆分属于破坏性变更,使用 Claude Agent SDK 的开发者必须升级运行时或适配新字段,否则会导致编译失败或数据解析错误。

What's changed

变更内容

  • Added cacheCreationEphemeral5mInputTokens and cacheCreationEphemeral1hInputTokens to ModelUsage, splitting cacheCreationInputTokens by cache lifetime
  • Changed background start-up work to wait until the first model request is sent, for about 10 seconds at most, when the first message arrives during start-up
  • Changed the minimum supported Node.js version from 18.0.0 to 18.14.0
  • Updated to parity with Claude Code v2.1.311
  • 向 ModelUsage 添加了 cacheCreationEphemeral5mInputTokens 和 cacheCreationEphemeral1hInputTokens,按缓存生命周期拆分 cacheCreationInputTokens
  • 更改后台启动工作逻辑,使其在启动期间收到第一条消息时,最多等待约 10 秒以发送首个模型请求
  • 将最低支持的 Node.js 版本从 18.0.0 提升至 18.14.0
  • 更新以与 Claude Code v2.1.311 保持同步

Update

更新

代码 · 7 行
npm install @anthropic-ai/[email protected]
# or
yarn add @anthropic-ai/[email protected]
# or
pnpm add @anthropic-ai/[email protected]
# or
bun add @anthropic-ai/[email protected]

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

关联信息,但可能不是同一事件