日志扩展字段
RequestLog.ext_fields 在 proto 中是松散的 google.protobuf.Struct,但实际内容是插件所定义的 Proto 的 ProtoJSON 表示。
当前代码实现下,已知的顶级 key 如下:
aidy- proto:ext.aidy.AidyExt
- 说明:AIDY 系统保留字段,由写入日志的 gateway 进程生成,当前包含
version和build_id
admission_policyguard- proto:plugin.guard.GuardLog
- 文档:Guard
egress_policyperf- proto:ext.perf.PerfExt
- 文档:Perf(流式性能)
usage- proto:ext.usage.UsageStat
- 文档:计费
- 说明:
input_tokens记录未缓存输入 token;缓存读取 / 写入输入分别记录在cached_read_tokens/cached_creation_tokens,total_tokens包含缓存输入,reasoning token 作为 telemetry 明细记录在reasoning_tokens
billing- proto:ext.billing.BillingStat
- 文档:计费
session- proto:ext.session.SessionExt
- 文档:会话(Session)
semantic_cacheprompt_compressor