Claude Code:Claude apps 网关管理 API 新增费用报告

Claude apps 网关管理 API 新增费用报告,可按日期范围读取过去支出,支持总计、按开发者、按天或按 IdP 组。

Claude Code
事件类型
功能更新
版本
v2.1.317
官方发布
本站整理

本次变化

共 5 条要点

  1. Claude apps 网关管理 API 新增费用报告,可按日期范围读取过去支出,支持总计、按开发者、按天或按 IdP 组。

    官方原文 · c1

    Added a cost report to the Claude apps gateway admin API, `GET /v1/organizations/analytics/cost`, for reading past spend over a date range in total, per developer, per day or per IdP group

    官方原文 · c1
  2. 在设置了 admin: 的 Claude apps 网关上,每日记录每位开发者的 IdP 组,保留 admin.identity_retention_days,费用报告按其分组。

    官方原文 · c2

    Added a daily record of each developer's IdP groups on Claude apps gateways with `admin:` set, kept for `admin.identity_retention_days`, which the cost report groups by

    官方原文 · c2
  3. Agent SDK 钩子回调新增 onFailure: "block",回调失败时阻止该操作,而不是让其运行。

    官方原文 · c3

    Added `onFailure: "block"` for Agent SDK hook callbacks, so a callback that fails blocks the action instead of letting it run

    官方原文 · c3
  4. 移除 Read 工具的“file unchanged since your last Read”存根,再次读取未更改文件会返回其内容。

    官方原文 · c5

    Removed the Read tool's "file unchanged since your last Read" stub: reading an unchanged file again returns its content

    官方原文 · c5
  5. claude -p 在磁盘或配额已满丢失记录或 ~/.claude.json 写入时不再以 0 退出,现在打印错误,text 和 json 输出下以 1 退出,写满的 NFS 导出可能漏检。

    官方原文 · c6

    Fixed `claude -p` exiting 0 when a full disk or quota lost its transcript or ~/.claude.json writes; it now prints an error and, in text and json output, exits 1. Full NFS exports may be missed

    官方原文 · c6

变化明细

下表字段直接取自官方原文,保持原文语言,不做翻译。

编号主体动作对象范围数值
c1Claude apps gateway admin APIaddedcost report for reading past spend over a date range in total, per developer, per day or per IdP groupClaude apps gateway admin API
c2Claude apps gateways with admin: setaddeddaily record of each developer's IdP groups, kept for admin.identity_retention_days, which the cost report groups byClaude apps gateways with `admin:` set
c3Agent SDK hook callbacksaddedonFailure: "block" so a failing callback blocks the action instead of letting it runAgent SDK
c5Read toolremoved"file unchanged since your last Read" stub, so reading an unchanged file again returns its content
c6claude -pfixed exiting 0 when a full disk or quota lost its transcript or ~/.claude.json writesnow prints an error and, in text and json output, exits 1; full NFS exports may be missedtext and json output精确 1

版本时间线

同一工具在本站已发布的快讯,按官方发布日期由新到旧。

  1. 当前Claude apps 网关管理 API 新增费用报告
  2. 新增设置:Linux沙箱命令可创建用户命名空间
  3. api_request 事件新增缓存写入拆分字段

关于这个工具

Claude Code

Claude Code 是 Anthropic 的编程 Agent,可围绕代码库读取上下文、修改文件、运行命令并协助开发任务。

分类AI编程工具

查看 Claude Code 详情

相关教程

来源与说明

官方原文 · github.com/anthropics/claude-code/releases/tag/v2.1.317

AI 整理说明

本条由 AI 依据官方来源整理并经自动核对;发现错误请 反馈。