Summary
Native Codex CLI requests to Amazon Bedrock Mantle cannot opt into GPT-5.6 Sol definitive punctual caching. On an agentic coding workload, this has produced a ample measurement of cache-write tokens and materially higher cost.
This is related to #35300, but adds independent accumulation usage grounds from the autochthonal amazon-bedrock provider.
Environment
- Codex CLI: 0.147.0
- Provider: autochthonal amazon-bedrock
- Endpoint: Bedrock Mantle Responses API, us-east-1
- Model: openai.gpt-5.6-sol
Observed accumulation usage
For the completed days 2026-08-05 done 2026-08-08, Cost Explorer usage quantities and the Bedrock complaint paper produced the pursuing cache-aware estimate for Sol:
| 3,656 | 171.94M | $1,182.09 | $1,386.46 |
Cache writes were astir 85% of the model's estimated spend.
A section Codex convention besides reported 76 Sol requests pinch 6.709M cache_write_input_tokens, zero cached_input_tokens, and an mean of astir 88K cache-write tokens per request. There were nary customer errors successful the corresponding CloudWatch metrics.
These are usage-derived estimates, not finalized AWS invoice amounts.
Investigation
Codex already emits a session-scoped prompt_cache_key, but the petition types for some HTTP and WebSocket Responses requests do not see either:
- prompt_cache_options
- prompt_cache_breakpoint
The built-in Amazon Bedrock supplier config exposes transport/auth settings, not system request-body transformation, truthful this cannot beryllium configured done config.toml.
AWS documents definitive cache mode for GPT-5.6 connected Bedrock specifically for agentic workflows pinch agelong unchangeable instructions/tool definitions followed by changing instrumentality and personification content. That matches the workload above.
Requested behavior
- Add support for serializing prompt_cache_options for GPT-5.6-capable Responses providers.
- Add a typed prompt_cache_breakpoint section to supported input contented blocks.
- Provide a provider/model capacity gross and a safe placement strategy astatine the extremity of Codex's measured unchangeable instruction/tool prefix.
- Surface cache sounds and cache writes successful per-turn usage telemetry truthful users tin diagnose costly full-prefix rewrites.
Scope
This study does not declare that each cache constitute is simply a defect. Cold starts, genuinely chopped prompts, forks, and compaction tin each require writes. The rumor is that autochthonal Bedrock Codex presently has nary measurement to usage the documented explicit-cache system for the stable-prefix case.
English (US) ·
Indonesian (ID) ·