Python SDK: TokenUsageBreakdown is missing the cacheWriteInputTokens field

Open 💬 0 comments Opened Aug 12, 2026 by comanadrianioan

Summary
The Python SDK's generated TokenUsageBreakdown type is missing the cacheWriteInputTokens field. This field is present in the source schema, so it appears the generated Python bindings are out of sync with the protocol definition.

Details
The file sdk/python/src/openai_codex/generated/v2_all.py is autogenerated based on codex_app_server_protocol.v2.schemas.json.
The source schema (codex_app_server_protocol.v2.schemas.json) defines cacheWriteInputTokens as part of the TokenUsageBreakdown structure, but this field is not present in the generated Python TokenUsageBreakdown type.

Expected Behavior
The generated TokenUsageBreakdown in v2_all.py should include the cacheWriteInputTokens field, matching the structure defined in codex_app_server_protocol.v2.schemas.json

Actual Behavior
The cacheWriteInputTokens field is missing from the TokenUsageBreakdown type in the Python SDK, meaning consumers of the SDK cannot access cache write token usage information

Impact
Users relying on the Python SDK are unable to read cacheWriteInputTokens from token usage data, resulting in incomplete usage/cost reporting compared to what the protocol actually provides

View original on GitHub ↗