Files
codex/codex-rs/app-server-protocol/schema/json/v2/RawResponseCompletedNotification.json
Adam Perry @ OpenAI 1d941253e9 Add cache-write tokens to the raw response schema (#33500)
## What changed

Add `cacheWriteInputTokens` to the usage breakdown in the
`rawResponse/completed` JSON schema, defaulting it to zero. Update the
compaction and turn-start notification expectations for the expanded usage
breakdown.

GitOrigin-RevId: d9232b724d646b803c7f5a64c5daa311f77ad408
2026-07-16 04:45:05 +00:00

71 lines
1.5 KiB
JSON
Generated

{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"TokenUsageBreakdown": {
"properties": {
"cacheWriteInputTokens": {
"default": 0,
"format": "int64",
"type": "integer"
},
"cachedInputTokens": {
"format": "int64",
"type": "integer"
},
"inputTokens": {
"format": "int64",
"type": "integer"
},
"outputTokens": {
"format": "int64",
"type": "integer"
},
"reasoningOutputTokens": {
"format": "int64",
"type": "integer"
},
"totalTokens": {
"format": "int64",
"type": "integer"
}
},
"required": [
"cachedInputTokens",
"inputTokens",
"outputTokens",
"reasoningOutputTokens",
"totalTokens"
],
"type": "object"
}
},
"description": "Internal-only notification containing the exact usage from one upstream Responses API completion.",
"properties": {
"responseId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
},
"usage": {
"anyOf": [
{
"$ref": "#/definitions/TokenUsageBreakdown"
},
{
"type": "null"
}
]
}
},
"required": [
"responseId",
"threadId",
"turnId"
],
"title": "RawResponseCompletedNotification",
"type": "object"
}