|
oc_chat
|
Re-export of the shared cache-extraction helpers.
Purpose
-------
The actual implementation lives in :mod:`option_c_agent_contracts.cache_usage`
— it's a neutral default that handles both DeepSeek's
``prompt_cache_hit_tokens`` / ``prompt_cache_miss_tokens`` fields
and the OpenAI-style ``prompt_tokens_details.cached_tokens``
fallback.
This module exists so DeepSeek-specific code (the provider plugin)
has a local symbol it can import while still sharing the same
default implementation. Providers whose usage shapes differ
override ``parse_usage`` directly and never import from here.
Responsibilities
----------------
- Re-export :func:`usage_prompt_cache_hit_miss` and
:func:`cache_hit_ratio_pct` from :mod:`option_c_agent_contracts.cache_usage`.
Diagnostics
-----------
Domain: OC_CHAT.CLIENT
Levels:
L2 — lifecycle events
L3 — semantic details
L4 — deep tracing
Contracts
---------
- This module has no logic of its own — re-imports only.
- The re-exported symbols are kept stable for the DeepSeek bundle's
internal callers; future moves of the shared implementation must
preserve the local import path.
Dependencies
------------
- oc_diagnostics (structured debug logging via _dbg)
- option_c_agent_contracts (usage_prompt_cache_hit_miss and cache_hit_ratio_pct, re-exported for the DeepSeek bundle)