Claude Code:Claude apps 网关管理 API 新增费用报告
Claude apps 网关管理 API 新增费用报告,可按日期范围读取过去支出,支持总计、按开发者、按天或按 IdP 组。
- 事件类型
- 功能更新
- 版本
- v2.1.317
- 官方发布
- 本站整理
本次变化
共 5 条要点
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 在设置了 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 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 移除 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 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
变化明细
下表字段直接取自官方原文,保持原文语言,不做翻译。
| 编号 | 主体 | 动作 | 对象 | 范围 | 数值 |
|---|---|---|---|---|---|
| c1 | Claude apps gateway admin API | added | cost report for reading past spend over a date range in total, per developer, per day or per IdP group | Claude apps gateway admin API | |
| c2 | Claude apps gateways with admin: set | added | daily record of each developer's IdP groups, kept for admin.identity_retention_days, which the cost report groups by | Claude apps gateways with `admin:` set | |
| c3 | Agent SDK hook callbacks | added | onFailure: "block" so a failing callback blocks the action instead of letting it run | Agent SDK | |
| c5 | Read tool | removed | "file unchanged since your last Read" stub, so reading an unchanged file again returns its content | ||
| c6 | claude -p | fixed exiting 0 when a full disk or quota lost its transcript or ~/.claude.json writes | now prints an error and, in text and json output, exits 1; full NFS exports may be missed | text and json output | 精确 1 |
版本时间线
同一工具在本站已发布的快讯,按官方发布日期由新到旧。
- 当前Claude apps 网关管理 API 新增费用报告
- 新增设置:Linux沙箱命令可创建用户命名空间
- api_request 事件新增缓存写入拆分字段
关于这个工具
相关教程
- AI 编程工具怎么选:IDE、终端与费用条件按 IDE、终端等工作场景,核对 Cursor、GitHub Copilot、Cline、Codex、Claude Code 和 OpenCode 的登录与费用条件;未确认项明确标注。
- AGENTS.md 和 CLAUDE.md:Claude Code 读哪个、怎样共用一份默认只有 AGENTS.md 才读它,有 CLAUDE.md 则只读后者;@AGENTS.md 可共用。未实测,以官方为准
- Claude Code code-review 插件(插件命令,不是 Skill)Anthropic 官方 code-review 插件:用 /code-review 对 PR 做多代理审查,依赖 gh CLI,未实测
- frontend-design:让界面设计避开模板默认Anthropic 官方 frontend-design 技能:做界面前先出设计方案并对照需求自查,避开模板化默认。未实测,以官方原文为准。
- 大仓库按目录分指令大仓库里按目录拆 AGENTS.md 与 CLAUDE.md:给示例目录树,逐工具对照加载范围、嵌套优先级和冲突规则。按官方文档核对,未实测。
- skill-creator:写、改、评估技能的官方技能Anthropic 官方 skill-creator 技能:带你起草技能、跑评估、改写并优化触发描述。未实测,请以官方原文和文档为准。
- webapp-testing Skill:用 Playwright 操作本地网页应用Anthropic 官方 webapp-testing Skill:用 Python Playwright 脚本验证本地网页,未实测
来源与说明
官方原文 · github.com/anthropics/claude-code/releases/tag/v2.1.317
AI 整理说明
本条由 AI 依据官方来源整理并经自动核对;发现错误请 反馈。