Parse OpenAI's native cache_write_tokens (chat prompt_tokens_details / responses input_tokens_details), bill it at the cache-creation ratio, and clamp the uncached prompt remainder at zero since cached + cache-write can exceed prompt_tokens. Propagate the field through chat/responses/claude format conversions and tiered expression billing (cc variable).
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| req_helpers.go | Loading commit data... | |
| to_claude_messages_req.go | Loading commit data... | |
| to_gemini_chat_req.go | Loading commit data... | |
| to_gemini_chat_req_preprocess.go | Loading commit data... | |
| to_oai_chat_req.go | Loading commit data... | |
| to_oai_chat_req_test.go | Loading commit data... | |
| to_oai_chat_resp.go | Loading commit data... | |
| to_oai_chat_resp_test.go | Loading commit data... | |
| to_oai_chat_stream_resp.go | Loading commit data... |