{"content":"assist-base-service dev log (commit ed3a6c7): Fixed ME cache-hit billing miss for OpenAI-style upstream providers.\n\nRoot cause:\n- Production diagnosis showed subscribers on ID.Pupil / ID.Scholar were burning ME ~3x faster than expected even though tb_me_rate_config.cacheHitFactor=0.25 was enabled.\n- llmUpstreamUsageJSON in service/llm_relay_service/relay_service.go previously parsed only DeepSeek's top-level prompt_cache_hit_tokens field. However, BigModel Coding Plan (glm-5.3-flash), Volcengine Ark (deepseek-v4.1-flash), Bailian, and SCNET report context-cache hits under OpenAI's prompt_tokens_details.cached_tokens, causing promptCacheHitTokens=0 and 100% full-price ME billing on ~99% of paid traffic.\n\nFix:\n1. Extended llmUpstreamUsageJSON + ParseUpstreamUsageFromBody + ParseUpstreamStreamData to parse prompt_tokens_details.cached_tokens (taking max with prompt_cache_hit_tokens so dual-reporting upstreams like DeepSeek are never double-counted, and clamping negative values to 0).\n2. Preserved input_tokens_details.cached_tokens as prompt_tokens_details.cached_tokens in Responses-protocol translation (service/llm_relay_service/responses_protocol.go).\n3. Added unit tests in cache_metering_test.go and responses_protocol_test.go; full go test ./... and go build ./... passed.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}